/*
Theme Name: Salma Flowers
Theme URI: https://salmaflowers.com
Description: Child theme of Astra for Salma Flowers. Holds the brand storefront design (moved from Customizer "Additional CSS" and the WPCode "Product Display" + "Accessibility" snippets) plus the custom wp-login.php UI (moved from the "Storefront UI" plugin). Does not touch checkout/payment.
Author: Salma Flowers Tech
Author URI: https://salmaflowers.com
Template: astra
Version: 1.2.2
Text Domain: salma-flowers
Tags: e-commerce, rtl-language-support, custom-colors
*/

/* =============================================================
   BRAND TOKENS (reference)
   ============================================================= */
:root{
  --sf-teal:#58C4C7;  --sf-pink:#FF8C94;  --sf-navy:#121826;
  --sf-gold:#C5A059;  --sf-cream:#FBF6ED; --sf-border:#E8E0D4;
  --sf-text:#374151;  --sf-muted:#6B7280;
}

/* =============================================================
   A) PRODUCT DISPLAY — single product (from WPCode "Product Display")
   ============================================================= */
.woocommerce-variation-price { display: none !important; }
.sf-recommend-section { margin-top: 50px; border-top: 1px solid #E8E0D4; padding-top: 30px; }
.sf-description-wrapper { max-width: 900px; margin: 40px auto; background: #FFFDFB; border: 1px solid #E8E0D4; border-radius: 12px; overflow: hidden; text-align: center; }
/* Accessible toggle: rendered as a real <button>; reset native button styles
   and drive the open state from [aria-expanded="true"] (set by JS). */
.sf-desc-toggle { width: 100%; border: none; text-align: left; margin: 0; padding: 15px 20px; font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #FAFAFA; color: #121826; transition: background 0.3s ease, color 0.3s ease; font-family: 'Outfit', sans-serif; text-transform: uppercase; }
.sf-desc-toggle:hover, .sf-desc-toggle[aria-expanded="true"] { background: #FF8C94; color: #ffffff; }
.sf-desc-chevron { flex: 0 0 auto; transition: transform 0.3s ease; }
.sf-desc-toggle[aria-expanded="true"] .sf-desc-chevron { transform: rotate(180deg); }
body.rtl .sf-desc-toggle { text-align: right; font-family: 'Tajawal', 'Cairo', sans-serif; }
.sf-desc-content { display: none; padding: 30px; border-top: 1px solid #E8E0D4; font-size: 0.95rem; line-height: 1.6; color: #475569; text-align: left; font-family: 'Open Sans', sans-serif; animation: fadeIn 0.5s ease; }
body.rtl .sf-desc-content { text-align: right; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Wishlist: hide in loops, style on single product */
ul.products li.product .yith-wcwl-add-to-wishlist { display: none !important; }
.single-product .yith-wcwl-add-to-wishlist { margin-top: 15px; margin-bottom: 15px; }
.single-product .yith-wcwl-add-to-wishlist a { display: inline-flex; align-items: center; gap: 8px; color: #121826; font-weight: 600; text-decoration: none; font-family: 'Open Sans', sans-serif; transition: color 0.3s; }
.single-product .yith-wcwl-add-to-wishlist a:hover,
.single-product .yith-wcwl-add-to-wishlist.exists a,
.single-product .yith-wcwl-add-to-wishlist.added a { color: #FF8C94 !important; }
.single-product .yith-wcwl-add-to-wishlist .feedback { display: none !important; }

/* =============================================================
   B) BRAND UI  (from Customizer "Additional CSS")
   ============================================================= */

/* 1. CATEGORY CARDS */
ul.products li.product-category {
    background: #ffffff !important; border-radius: 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
    border: none !important; overflow: hidden !important; padding-bottom: 24px !important;
    display: flex !important; flex-direction: column !important; list-style: none !important;
}
ul.products li.product-category:hover { transform: translateY(-8px) !important; box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important; }
ul.products li.product-category a { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: none !important; box-shadow: none !important; }
ul.products li.product-category a::before, ul.products li.product-category a::after { display: none !important; }
ul.products li.product-category img {
    border-radius: 20px 20px 0 0 !important; width: 100% !important; height: auto !important;
    aspect-ratio: 1 / 1 !important; object-fit: cover !important; margin: 0 0 20px 0 !important;
    display: block !important; transition: transform 0.8s ease !important; min-height: auto !important; max-height: none !important;
}
ul.products li.product-category:hover img { transform: scale(1.06) !important; }
ul.products li.product-category .woocommerce-loop-category__title {
    position: relative !important; bottom: auto !important; left: auto !important; right: auto !important;
    background: transparent !important; padding: 0 20px !important; font-size: 18px !important;
    font-family: 'Open Sans', sans-serif !important; color: #121826 !important; font-weight: 700 !important;
    text-align: center !important; margin-bottom: 0 !important; text-transform: uppercase !important;
    line-height: 1.4 !important; box-shadow: none !important; flex-grow: 1;
}
ul.products li.product-category .woocommerce-loop-category__title::after { display: none !important; }
ul.products li.product-category .count { display: none !important; }
ul.products li.product-category .woocommerce-loop-category__title::before {
    display: flex !important; align-items: center; justify-content: center; width: calc(100% - 40px);
    margin: 15px auto 0; background-color: #58C4C7; color: #ffffff; text-transform: uppercase;
    border-radius: 50px; padding: 12px 20px; font-weight: 600; font-family: 'Open Sans', sans-serif;
    font-size: 14px; letter-spacing: 0.5px; transition: all 0.3s ease; border: 2px solid #58C4C7;
}
ul.products li.product-category:hover .woocommerce-loop-category__title::before {
    background-color: #FF8C94; border-color: #FF8C94; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 140, 148, 0.3);
}
@media (max-width: 768px) {
    ul.products li.product-category .woocommerce-loop-category__title { font-size: 15px !important; padding: 0 12px !important; }
    ul.products li.product-category .woocommerce-loop-category__title::before { width: calc(100% - 24px); padding: 10px 15px; font-size: 12px; margin-top: 12px; }
}

/* 2. PRODUCT CARDS */
ul.products li.product {
    background: #ffffff; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease; border: none; overflow: hidden;
    padding-bottom: 24px !important; display: flex; flex-direction: column;
}
ul.products li.product:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0,0,0,0.12); }
ul.products li.product a.woocommerce-LoopProduct-link { display: block; overflow: hidden; position: relative; }
ul.products li.product a img { border-radius: 20px 20px 0 0; width: 100%; margin: 0; display: block; transition: transform 0.8s ease; }
ul.products li.product:hover a img { transform: scale(1.06); }
ul.products li.product .woocommerce-loop-product__title {
    padding: 0 20px; margin-top: 25px !important; font-size: 18px; font-family: 'Open Sans', sans-serif;
    color: #121826; font-weight: 700; text-align: center; margin-bottom: 12px; text-transform: uppercase; line-height: 1.4;
}
ul.products li.product .price {
    color: #374151; font-size: 18px; font-weight: 600; font-family: 'Open Sans', sans-serif;
    display: block; text-align: center; margin-bottom: 20px;
}
ul.products li.product .price del { color: #6B7280; opacity: 0.8; font-size: 14px; margin-right: 6px; font-weight: 400; }
ul.products li.product .price ins { text-decoration: none; color: #58C4C7; font-weight: 700; }
/* "From" label on variable-product prices (translatable via TranslatePress) */
.sf-price-from { font-weight: 400; font-size: 0.72em; color: #6B7280; text-transform: uppercase; letter-spacing: 0.5px; }
ul.products li.product .button {
    display: flex; align-items: center; justify-content: center; width: calc(100% - 40px);
    margin: auto auto 0 !important; background-color: #58C4C7; color: #ffffff; text-transform: uppercase;
    border-radius: 50px; padding: 12px 20px; font-weight: 600; font-family: 'Open Sans', sans-serif;
    font-size: 14px; letter-spacing: 0.5px; transition: all 0.3s ease; border: 2px solid #58C4C7;
}
ul.products li.product .button:hover { background-color: #FF8C94; border-color: #FF8C94; color: #ffffff; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 140, 148, 0.3); }
@media (max-width: 768px) {
    ul.products li.product .woocommerce-loop-product__title { font-size: 15px; padding: 0 12px; margin-top: 20px !important; }
    ul.products li.product .price { font-size: 16px; margin-bottom: 16px; }
    ul.products li.product .button { width: calc(100% - 24px); padding: 10px 15px; font-size: 12px; }
}

/* 3. RTL & ARABIC */
body.rtl, body.rtl .woocommerce-loop-category__title, body.rtl .woocommerce-loop-product__title,
body.rtl .price, body.rtl .button { font-family: 'Tajawal', 'Cairo', 'Open Sans', sans-serif !important; }
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6,
body.rtl .sf-btn, body.rtl .main-header-menu a { font-family: 'Tajawal', 'Cairo', sans-serif !important; }
body.rtl, body.rtl * { letter-spacing: 0 !important; }

/* 4. GLOBAL UX */
.woocommerce-product-gallery__image img, ul.products li.product a img { aspect-ratio: 1 / 1 !important; object-fit: cover !important; }
a:focus, button:focus, input:focus, select:focus, textarea:focus { outline: 2px solid #58C4C7; outline-offset: 2px; }
@media (max-width: 768px) { ul.products li.product .button, ul.products li.product-category a { cursor: pointer; touch-action: manipulation; } }

/* 5. SINGLE PRODUCT PAGE */
.woocommerce div.product div.images img { border-radius: 20px; }
.woocommerce div.product .product_title { font-family: 'Open Sans', sans-serif !important; font-weight: 700; color: #121826; text-transform: uppercase; }
body.rtl .woocommerce div.product .product_title { font-family: 'Tajawal', 'Cairo', sans-serif !important; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: #374151; font-weight: 700; font-size: 1.3rem; font-family: 'Open Sans', sans-serif; }
.woocommerce div.product .single_add_to_cart_button {
    background-color: #58C4C7 !important; color: #ffffff !important; border: 2px solid #58C4C7 !important;
    border-radius: 50px !important; padding: 12px 30px !important; font-weight: 700 !important;
    font-family: 'Open Sans', sans-serif !important; text-transform: uppercase !important; transition: all 0.3s ease !important;
}
.woocommerce div.product .single_add_to_cart_button:hover { background-color: #FF8C94 !important; border-color: #FF8C94 !important; transform: translateY(-2px) !important; box-shadow: 0 6px 15px rgba(255, 140, 148, 0.3) !important; }
body.rtl .woocommerce div.product .single_add_to_cart_button { font-family: 'Tajawal', 'Cairo', sans-serif !important; }
.woocommerce .quantity .qty { border: 2px solid #E8E0D4 !important; border-radius: 10px !important; padding: 8px !important; width: 70px !important; height: 44px !important; text-align: center !important; font-size: 16px !important; }
/* Comfortable touch targets (>=44px) for the quantity stepper and buttons */
.woocommerce .quantity .plus, .woocommerce .quantity .minus,
.woocommerce .quantity button.plus, .woocommerce .quantity button.minus,
.ast-qty-plus, .ast-qty-minus { min-width: 44px !important; min-height: 44px !important; }
@media (max-width: 768px) {
    .woocommerce div.product .single_add_to_cart_button,
    ul.products li.product .button,
    .sf-desc-toggle,
    .sf-recommend-section .add_to_cart_button { min-height: 44px; }
}

/* 6. LUXURY LAYOUT & CROSS-SELLS */
.sf-layout-title { text-align: center; font-family: 'Open Sans', sans-serif !important; font-size: clamp(1.5rem, 3vw, 2.2rem) !important; color: #121826; margin: 40px 0 30px !important; font-weight: 700; text-transform: uppercase; }
body.rtl .sf-layout-title { font-family: 'Tajawal', 'Cairo', sans-serif !important; }
.sf-similar-grid ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important; }
.sf-recommend-section .product { background: #ffffff !important; border: none !important; border-radius: 20px !important; padding: 15px !important; box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important; transition: all 0.3s ease !important; text-align: center !important; }
.sf-recommend-section .product:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important; transform: translateY(-5px); }
.sf-recommend-section .product img { border-radius: 12px !important; margin-bottom: 15px !important; }
.sf-recommend-section .woocommerce-loop-product__title { font-size: 14px !important; font-family: 'Open Sans', sans-serif !important; font-weight: 700 !important; color: #121826 !important; min-height: 40px; line-height: 1.3 !important; text-transform: uppercase; }
.sf-recommend-section .price { font-size: 14px !important; color: #374151 !important; font-weight: 600 !important; margin-bottom: 15px !important; }
.sf-recommend-section .add_to_cart_button { background: #58C4C7 !important; color: #ffffff !important; font-size: 11px !important; font-weight: 600 !important; padding: 10px 15px !important; border-radius: 50px !important; text-transform: uppercase !important; transition: all 0.3s ease !important; }
.sf-recommend-section .add_to_cart_button:hover { background: #FF8C94 !important; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255, 140, 148, 0.3) !important; }
@media (max-width: 1024px) { .sf-similar-grid ul.products { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 768px) { .sf-similar-grid ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; } .sf-layout-title { font-size: 1.3rem !important; } }

/* 7. SMART SALE BADGES */
.astra-shop-thumbnail-wrap { position: relative !important; }
.woocommerce span.onsale, .ast-onsale-card, .woocommerce-badges .onsale, .ast-site-content .woocommerce span.onsale {
    background: linear-gradient(135deg, #FF9BA2, #FF6E78) !important; color: #121826 !important; border-radius: 8px !important;
    padding: 6px 18px !important; min-height: auto !important; min-width: auto !important; height: auto !important; width: auto !important;
    font-weight: 700 !important; font-family: 'Tajawal', sans-serif !important; box-shadow: 0 4px 12px rgba(255, 140, 148, 0.35) !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important; line-height: 1.5 !important;
    z-index: 99 !important; border: none !important; position: absolute !important; top: auto !important; bottom: 0 !important;
    left: 50% !important; right: auto !important; transform: translate(-50%, 50%) !important;
}
.woocommerce span.onsale, .ast-onsale-card { font-size: 0 !important; }
.woocommerce span.onsale::after, .ast-onsale-card::after { content: "Sale" !important; font-size: 14px !important; letter-spacing: 0.5px; display: block !important; }
body.rtl .woocommerce span.onsale, body.rtl .ast-onsale-card { right: 50% !important; left: auto !important; transform: translate(50%, 50%) !important; }
ul.products li.product:hover span.onsale, ul.products li.product:hover .ast-onsale-card { transform: translate(-50%, 40%) scale(1.05) !important; transition: all 0.3s ease !important; }
body.rtl ul.products li.product:hover span.onsale, body.rtl ul.products li.product:hover .ast-onsale-card { transform: translate(50%, 40%) scale(1.05) !important; }

/* =============================================================
   C) ACCESSIBILITY & COLOR CONTRAST  (from WPCode "Accessibility")
   ============================================================= */
.sf-prod-price, .price { color: #121826 !important; font-weight: 700; }
.sf-features-bar p, .sf-features-bar { color: #333333 !important; }
.sf-review-name { color: #000000 !important; }
.trp-language-switcher { color: #121826 !important; }

/* =============================================================
   D) THIRD-PARTY UI CONTRAST FIXES  (PageSpeed accessibility)
   ============================================================= */
/* WooCommerce store notice: brand restyle + accessible contrast.
   (Keeps the promo but replaces the low-contrast default colors.) */
.woocommerce-store-notice,
p.woocommerce-store-notice,
p.demo_store {
  background-color: #121826 !important;   /* navy */
  color: #ffffff !important;
  font-weight: 600 !important;
  text-align: center;
}
.woocommerce-store-notice a,
.woocommerce-store-notice__dismiss-link,
p.demo_store a {
  color: #58C4C7 !important;              /* teal */
  font-weight: 700 !important;
  text-decoration: underline;
}
/* TranslatePress language name: darken so "EN" is readable on light backgrounds */
.trp-language-switcher .trp-language-item-name,
.trp-ls-shortcode-current-language,
.trp-language-switcher a { color: #121826 !important; }
