/*
Theme Name: NAF NFC Custom Theme
Theme URI: https://nafnfc.com
Author: NAF NFC
Description: A lightweight custom theme built from scratch for WooCommerce.
Version: 3.5 (Cleaned)
Text Domain: naf-nfc
*/

/* =========================================
   1. ROOT VARIABLES & GLOBAL RESET
   ========================================= */
:root {
    --naf-dark: #05102A;
    --naf-gold: #E4B54B;
    --naf-white: #ffffff;
    --naf-light: #f4f6f8;
    --naf-text: #333333;
    --naf-border: #e1e1e1;
    --naf-footer-bg: #030816;
}

body {
    font-family: 'Exo', sans-serif;
    margin: 0; padding: 0;
    box-sizing: border-box;
    background-color: var(--naf-light);
    color: var(--naf-text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { color: var(--naf-dark); margin-top: 0; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 100%; }

/* =========================================
   2. HEADER STYLES
   ========================================= */
/* Top Bar */
.header-top-bar {
    background-color: var(--naf-white);
    border-bottom: 1px solid var(--naf-border);
    padding: 8px 0;
    font-size: 0.9rem;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }

/* Main Row */
.naf-main-row { position: relative; z-index: 100; transition: padding 0.3s ease; }
.naf-socials-area { display: flex; align-items: center; flex: 1; gap: 15px; }
.naf-logo-area { flex: 1; display: flex; justify-content: center; align-items: center; }
.naf-icons-area { flex: 1; display: flex; justify-content: flex-end; align-items: center; }

.logo-link-wrapper { display: flex; align-items: center; gap: 15px; }
.logo-link-wrapper.pos-below { flex-direction: column; }
.site-title-text { font-weight: 800; text-transform: uppercase; }

/* Bottom Row (Nav & Icons) */
.naf-bottom-row { position: relative; z-index: 99; }
.naf-bottom-actions { display: flex; align-items: center; gap: 20px; }

/* Desktop Navigation (Min-Width 769px) */
@media (min-width: 769px) {
    .naf-bottom-row .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
    .nav-wrapper { display: block !important; }
    .main-navigation ul, .naf-bottom-nav {
        display: flex !important; flex-direction: row !important; list-style: none !important; margin: 0 !important; padding: 0 !important;
    }
    .main-navigation li, .naf-bottom-nav li { margin-right: 30px !important; }
    .main-navigation a, .naf-bottom-nav a {
        font-weight: 700; text-transform: uppercase; font-size: 0.9rem; padding: 15px 0; display: block;
    }
    .mobile-toggle-btn { display: none !important; }
}

/* =========================================
   3. COMPONENTS (Ticker, Widgets, Buttons)
   ========================================= */
/* News Ticker */
.naf-ticker-wrapper { width: 100%; overflow: hidden; white-space: nowrap; padding: 10px 0; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; position: relative; z-index: 90; border-bottom: 1px solid rgba(255,255,255,0.1); }
.naf-ticker-content { display: inline-block; padding-left: 100%; animation-name: naf-scroll; animation-timing-function: linear; animation-iteration-count: infinite; }
.ticker-block { display: inline-block; padding-right: 50px; }
.ticker-msg { margin: 0 10px; }
.naf-ticker-wrapper:hover .naf-ticker-content { animation-play-state: paused; }
@keyframes naf-scroll { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

/* Categories Grid (Home) */
.naf-categories-section { padding: 50px 0; background-color: transparent; }
.cats-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; } /* Desktop Default */
.cat-box { background: #ffffff; border: 1px solid rgba(0,0,0,0.04); border-radius: 12px; padding: 35px 25px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 5px 20px rgba(0,0,0,0.03); transition: all 0.4s ease; text-decoration: none; position: relative; height: auto; flex: 0 1 280px; min-width: 220px; width: 100%; }
.cat-icon i { font-size: 2.8rem; color: var(--naf-dark); margin-bottom: 20px; transition: 0.3s; }
.cat-title { font-size: 1.1rem; font-weight: 800; color: var(--naf-text); margin: 0; text-transform: uppercase; }
.cat-arrow { opacity: 0; transform: translateY(15px); transition: 0.4s; color: var(--naf-gold); margin-top: 15px; }

.cat-box:hover { border-color: var(--naf-gold); transform: translateY(-10px); box-shadow: 0 15px 30px rgba(5,16,42,0.1); }
.cat-box:hover .cat-icon i { color: var(--naf-gold); transform: scale(1.1); }
.cat-box:hover .cat-arrow { opacity: 1; transform: translateY(0); }

/* Global Quantity Buttons (+/-) */
.quantity { display: inline-flex !important; align-items: center; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; margin-right: 15px; }
.quantity .input-text.qty { width: 40px !important; height: 45px !important; border: none !important; background: #fff !important; text-align: center; font-weight: 700; color: var(--naf-dark); padding: 0; margin: 0; -moz-appearance: textfield; }
.quantity .input-text.qty::-webkit-outer-spin-button, .quantity .input-text.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.minus-btn, .plus-btn { width: 35px; height: 45px; background-color: #f9f9f9; border: none; color: var(--naf-dark); font-weight: 800; font-size: 1.2rem; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.minus-btn:hover, .plus-btn:hover { background-color: var(--naf-gold); color: #fff; }

/* =========================================
   4. FOOTER STYLES
   ========================================= */
.site-footer-wrapper { background: var(--naf-dark); color: #fff; padding-top: 60px; border-top: 4px solid var(--naf-gold); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-widget li { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 5px 0; }
.widget-title { color: var(--naf-gold); text-transform: uppercase; margin-bottom: 20px; }
.footer-bottom { background: var(--naf-footer-bg); padding: 20px 0; text-align: center; color: #888; }

/* =========================================
   5. WOOCOMMERCE: GLOBAL PRODUCT LOOPS (Grid & Cards)
   ========================================= */
/* The Grid */
.woocommerce ul.products, .woocommerce-page ul.products, .entry-content ul.products, div.woocommerce ul.products {
    display: grid !important; grid-template-columns: repeat(4, 1fr) !important;
    row-gap: 50px !important; column-gap: 30px !important; margin: 0 0 80px 0 !important; padding: 0 !important; list-style: none !important;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { content: none !important; display: none !important; }

/* The Product Card */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
    float: none !important; width: auto !important; margin: 0 !important;
    background: #ffffff; border: 1px solid rgba(0,0,0,0.05); border-radius: 12px;
    padding: 20px; text-align: center; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    display: flex !important; flex-direction: column !important; height: 100% !important; position: relative !important;
}
.woocommerce ul.products li.product:hover { border-color: var(--naf-gold); transform: translateY(-5px); box-shadow: 0 15px 30px rgba(5, 16, 42, 0.1); }

/* Elements inside Card */
.woocommerce ul.products li.product a img { width: 100%; height: auto; object-fit: contain; margin-bottom: 15px; display: block; }
.woocommerce ul.products li.product .onsale {
    position: absolute !important; top: 10px !important; right: 10px !important; left: auto !important;
    background-color: var(--naf-gold) !important; color: var(--naf-dark) !important;
    font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 20px; min-height: auto; line-height: 1; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 0.95rem; font-weight: 700; color: var(--naf-dark); margin: 0 0 10px 0; line-height: 1.3; text-transform: uppercase; }

/* Loop Price */
.woocommerce ul.products li.product .price { display: block; color: var(--naf-gold) !important; font-weight: 700; font-size: 1rem; margin-top: auto !important; margin-bottom: 15px !important; }
.woocommerce ul.products li.product .price del { color: #bbb !important; opacity: 0.7; margin-right: 5px; font-size: 0.85rem; }
.woocommerce ul.products li.product .price ins { color: var(--naf-gold) !important; background: transparent !important; text-decoration: none; }

/* Loop Buttons */
.woocommerce ul.products li.product .button, .woocommerce ul.products li.product .added_to_cart, .woocommerce ul.products li.product .wpcbn-btn {
    display: block; width: 100%; margin-bottom: 5px; padding: 10px 0; border-radius: 6px;
    font-weight: 700; font-size: 0.8rem; text-align: center; text-transform: uppercase;
    background-color: var(--naf-dark) !important; color: #fff !important; border: none; transition: 0.3s;
}
.woocommerce ul.products li.product .button:hover { background-color: var(--naf-gold) !important; color: var(--naf-dark) !important; }

/* Grid Responsiveness (Tablet) */
@media (max-width: 1200px) { .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 992px) { .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; row-gap: 30px !important; column-gap: 20px !important; } }


/* =========================================
   6. WOOCOMMERCE: SINGLE PRODUCT PAGE
   ========================================= */
/* Layout Container */
.woocommerce div.product { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 40px; margin-bottom: 60px; }
.woocommerce div.product div.images { flex: 0 0 40%; width: 40% !important; float: none !important; position: relative !important; }
.woocommerce div.product div.summary { flex: 0 0 55%; width: 55% !important; float: none !important; display: flex; flex-direction: column; }

/* Elements */
.woocommerce div.product div.images img { border-radius: 12px; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.03); width: 100%; display: block; }
.woocommerce-product-gallery__trigger { display: none !important; }
.woocommerce span.onsale { background-color: var(--naf-gold) !important; color: var(--naf-dark) !important; padding: 9px 10px; border-radius: 20px; font-weight: 800; z-index: 9; }

/* Text Info */
.woocommerce div.product .product_title { font-size: 1.8rem; font-weight: 800; color: var(--naf-dark); margin-bottom: 10px; text-transform: uppercase; line-height: 1.2; }
.woocommerce-product-details__short-description { font-size: 0.95rem; color: #666; line-height: 1.6; margin-bottom: 20px; padding: 15px; background: #fcfcfc; border-radius: 8px; border-left: 3px solid var(--naf-gold); }

/* Price (Golden Fix) */
.single-product div.product p.price, .single-product div.product span.price { color: var(--naf-gold) !important; font-size: 1.8rem !important; font-weight: 800 !important; margin-bottom: 30px !important; opacity: 1 !important; display: flex; align-items: center; gap: 15px; }
.single-product div.product p.price del { color: #ccc !important; font-size: 1.2rem !important; font-weight: 400 !important; opacity: 0.8 !important; }
.single-product div.product p.price ins { color: var(--naf-gold) !important; text-decoration: none; background: transparent !important; }
/* Hide default duplicate price if exists */


/* Cart Form */
.woocommerce div.product form.cart { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.woocommerce div.product button.single_add_to_cart_button { flex-grow: 1; height: 45px; background-color: var(--naf-dark) !important; color: var(--naf-gold) !important; font-size: 1rem; font-weight: 700; text-transform: uppercase; border-radius: 6px; transition: 0.3s; }
.woocommerce div.product button.single_add_to_cart_button:hover { background-color: var(--naf-gold) !important; color: var(--naf-dark) !important; transform: translateY(-2px); }

/* Meta & Tabs */
.product_meta { font-size: 0.85rem; color: #999; margin-top: 10px; }
.product_meta a { color: var(--naf-dark); font-weight: 600; }
.woocommerce div.product .woocommerce-tabs ul.tabs { background: transparent !important; border-bottom: 2px solid #eee; padding: 0; margin: 0 0 20px; display: flex; gap: 20px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: transparent !important; border: none !important; margin: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: #999; font-weight: 700; font-size: 0.9rem; text-transform: uppercase; padding-bottom: 10px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--naf-dark); border-bottom: 3px solid var(--naf-gold); }
.woocommerce div.product .woocommerce-tabs .panel { background: #fff; padding: 25px; border-radius: 10px; border: 1px solid #f0f0f0; }

/* =========================================
   7. WOOCOMMERCE: CART PAGE
   ========================================= */
/* Cart Table */
.woocommerce-cart table.cart { 
    border: none; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.02); 
    background: #fff; 
    
    /* التعديل هنا: ضفنا مسافة من فوق 50 بكسل */
    margin-top: 10px !important; 
    margin-bottom: 10px; 
    
    border-collapse: separate; 
    border-spacing: 0; 
    width: 100%; 
}
.woocommerce-cart table.cart thead { background-color: var(--naf-dark); color: #fff; }
.woocommerce-cart table.cart th { padding: 15px; font-size: 0.9rem; text-transform: uppercase; font-weight: 700; }
.woocommerce-cart table.cart td { padding: 20px 15px; border-top: 1px solid #eee; vertical-align: middle; }

/* Items */
.woocommerce-cart table.cart .product-thumbnail img { width: 70px; height: auto; border-radius: 8px; border: 1px solid #eee; }
.woocommerce-cart table.cart .product-name a { color: var(--naf-dark); font-weight: 700; font-size: 1rem; }
.woocommerce-cart table.cart .product-price, .woocommerce-cart table.cart .product-subtotal { color: var(--naf-gold); font-weight: 700; }
.woocommerce-cart table.cart .product-remove a { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background-color: #eee; color: #666 !important; font-size: 1.2rem; transition: 0.3s; }
.woocommerce-cart table.cart .product-remove a:hover { background-color: #ff4d4d; color: #fff !important; transform: scale(1.1); }

/* Coupon & Actions */
.woocommerce-cart table.cart td.actions .coupon { display: flex; align-items: center; gap: 10px; float: left; }
.woocommerce-cart table.cart td.actions .input-text { width: 180px !important; height: 45px; border: 1px solid #ddd; border-radius: 6px; padding: 0 15px; margin: 0 !important; }
.woocommerce-cart table.cart td.actions .button { height: 45px !important; background-color: var(--naf-dark) !important; color: var(--naf-gold) !important; border-radius: 6px; font-weight: 700; padding: 0 25px; border: none; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.woocommerce-cart button[name="update_cart"] { display: none !important; }
.woocommerce-cart .woocommerce-message { display: none !important; } /* Hide green update message */

/* Cart Totals & Checkout */
.cart-collaterals .cart_totals { float: right; width: 40%; background: #fff; padding: 35px; border-radius: 12px; border: none !important; box-shadow: 0 10px 40px rgba(0,0,0,0.05) !important; margin-bottom: 80px; }
.cart-collaterals .cart_totals h2 { font-size: 1.3rem; font-weight: 800; color: var(--naf-dark); text-transform: uppercase; margin-bottom: 25px; border-bottom: none; }
.cart-collaterals .cart_totals table { width: 100%; border-collapse: collapse; margin-bottom: 30px; border: none !important; }
.cart-collaterals .cart_totals table th, .cart-collaterals .cart_totals table td { border-bottom: 1px solid #f5f5f5; padding: 15px 0; }
.wc-proceed-to-checkout a.checkout-button { background-color: var(--naf-dark) !important; color: var(--naf-gold) !important; font-size: 1rem; font-weight: 800; text-transform: uppercase; padding: 18px; border-radius: 8px; display: block; text-align: center; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(5, 16, 42, 0.2); }
.wc-proceed-to-checkout a.checkout-button:hover { background-color: var(--naf-gold) !important; color: var(--naf-dark) !important; transform: translateY(-2px); }

/* EMPTY CART PAGE  */

/* 1. الحاوية والأيقونة */
.woocommerce-cart .cart-empty.woocommerce-info { background: #fff; border: none; border-radius: 12px; padding: 60px 20px; text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--naf-dark); box-shadow: 0 10px 30px rgba(0,0,0,0.03); margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.woocommerce-cart .cart-empty.woocommerce-info::before { display: none; }
.woocommerce-cart .cart-empty.woocommerce-info::after { content: '\f290'; font-family: "Font Awesome 6 Free"; font-weight: 900; display: block; font-size: 5rem; color: #f0f0f0; margin-bottom: 20px; order: -1; }

/* 2. زر العودة للمتجر (توسيط + هوفر) */
.woocommerce-cart .return-to-shop { display: flex !important; justify-content: center !important; align-items: center !important; width: 100% !important; margin-bottom: 50px; }
.woocommerce-cart .return-to-shop .button { background: var(--naf-gold) !important; color: var(--naf-dark) !important; padding: 15px 50px; font-size: 1.1rem; font-weight: 800; text-transform: uppercase; border-radius: 50px; transition: all 0.3s ease !important; box-shadow: 0 5px 15px rgba(228, 181, 75, 0.3); float: none !important; display: inline-flex !important; margin: 0 !important; }
.woocommerce-cart .return-to-shop .button:hover { background: var(--naf-dark) !important; color: var(--naf-gold) !important; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(5, 16, 42, 0.2); }


/* =========================================
   17. CATEGORY CARDS TWEAKS (Royal Dark & Gold)
   ========================================= */

/* 1. إخفاء العداد (الرقم) نهائياً */
.woocommerce ul.products li.product-category .count {
    display: none !important;
}

/* 2. تنسيق بطاقة الكاتيجوري (كحلي وذهبي) */
.woocommerce ul.products li.product-category {
    background-color: var(--naf-dark) !important; /* خلفية كحلي */
    border: 1px solid var(--naf-dark) !important;
    transition: all 0.3s ease !important;
}

/* تنسيق العنوان داخل البطاقة */
.woocommerce ul.products li.product-category .woocommerce-loop-category__title {
    color: var(--naf-gold) !important; /* النص ذهبي */
    text-align: center !important;
    font-size: 1rem !important;
    margin: 10px 0 0 0 !important;
    padding: 0 !important;
}

/* 3. تأثير الهوفر (عكس الألوان: خلفية ذهبية ونص كحلي) */
.woocommerce ul.products li.product-category:hover {
    background-color: var(--naf-gold) !important; /* تقلب الخلفية ذهبي */
    border-color: var(--naf-gold) !important;
    transform: translateY(-5px); /* رفعة خفيفة */
}

/* تغيير لون النص عند الهوفر ليصير كحلي */
.woocommerce ul.products li.product-category:hover .woocommerce-loop-category__title {
    color: var(--naf-dark) !important;
}

/* تغيير لون الصورة عند الهوفر (اختياري: تفتيح بسيط) */
.woocommerce ul.products li.product-category:hover img {
    opacity: 0.9;
}


/* =========================================
   18. CHECKOUT PAGE STYLES (MODERN GRID)
   ========================================= */

/* 1. Layout: Two Columns (Fields Left, Order Right) */
/* 1. Layout: Two Columns (Fixed Alignment) */
.woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 40px;
    margin-top: 30px;
    
    /* هذا السطر السحري: بيمنع العمود اليسار من التمدد للفراغ */
    align-items: start !important; 
}
/* 2. Customer Details (Left Side) */
.woocommerce-checkout #customer_details {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}

.woocommerce-checkout .col-1, 
.woocommerce-checkout .col-2 {
    max-width: 100%;
    flex: 0 0 100%;
}

/* Headings */
.woocommerce-checkout h3 {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    color: var(--naf-dark);
}

/* 3. Input Fields Styling */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 0.95rem;
    color: var(--naf-text);
    width: 100%;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none; /* إزالة ظلال الووكومرس */
}

/* Focus State (Golden Glow) */
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    background-color: #fff;
    border-color: var(--naf-gold);
    box-shadow: 0 0 0 3px rgba(228, 181, 75, 0.1);
}

/* Labels */
.woocommerce-checkout label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--naf-dark);
    margin-bottom: 8px;
    display: block;
}

/* 4. Order Review & Payment (Right Side - Sticky Card) */
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    grid-column: 2;
}

/* إخفاء العنوان المكرر فوق البوكس إذا وجد */
.woocommerce-checkout #order_review_heading {
    display: none; 
}

/* الصندوق نفسه (The Money Box) */
.woocommerce-checkout #order_review {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--naf-gold); /* إطار ذهبي لتمييزه */
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px; /* يثبت لما تعمل سكرول */
    height: fit-content;
}

/* إضافة عنوان "Your Order" يدوياً عبر CSS للترتيب */
.woocommerce-checkout #order_review::before {
    content: 'Your Order Summary';
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--naf-dark);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* الجدول داخل الملخص */
.woocommerce-checkout table.shop_table {
    border: none;
    margin-bottom: 20px;
}
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
    border-bottom: 1px solid #f5f5f5;
    padding: 15px 0;
}
.woocommerce-checkout table.shop_table tfoot th {
    color: #666;
    font-weight: 600;
}
.woocommerce-checkout table.shop_table .order-total th,
.woocommerce-checkout table.shop_table .order-total td {
    border-bottom: none;
    font-size: 1.2rem;
    color: var(--naf-dark);
    padding-top: 20px;
}
.woocommerce-checkout table.shop_table .order-total td span {
    color: var(--naf-gold);
    font-weight: 800;
}

/* 5. Payment Methods Styling */
#payment {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}
#payment ul.payment_methods {
    padding: 0;
    margin: 0 0 20px 0;
    list-style: none;
    border-bottom: 1px solid #eee;
}
#payment ul.payment_methods li {
    margin-bottom: 10px;
}
#payment ul.payment_methods li input {
    margin-right: 10px;
}
#payment ul.payment_methods li label {
    display: inline-block;
    font-size: 1rem;
    color: var(--naf-dark);
    cursor: pointer;
}

/* صندوق الوصف الرمادي لطريقة الدفع */
#payment div.payment_box {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #666;
    margin: 10px 0 20px 0;
    border: 1px solid #eee;
    position: relative;
}
#payment div.payment_box::before {
    content: '';
    display: block;
    border: 8px solid transparent;
    border-bottom-color: #eee; /* السهم الصغير */
    position: absolute;
    top: -16px;
    left: 20px;
}

/* زر إتمام الطلب (Place Order) */
#payment #place_order {
    background-color: var(--naf-dark);
    color: var(--naf-gold);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 18px;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(5, 16, 42, 0.2);
    float: none; /* إلغاء تعويم ووكومرس */
}
#payment #place_order:hover {
    background-color: var(--naf-gold);
    color: var(--naf-dark);
    transform: translateY(-2px);
}

/* 6. Checkout Notices (Coupons/Login) */
.woocommerce-info {
    background-color: #fff;
    border-top: 3px solid var(--naf-gold);
    color: var(--naf-dark);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    padding: 15px 20px;
    margin-bottom: 20px !important;
}
.woocommerce-info::before { color: var(--naf-gold); }
.woocommerce-info a { color: var(--naf-dark); font-weight: 700; text-decoration: underline; }

/* =========================================
   20. CHECKOUT MOBILE FIX (NARROWER & CLEAN)
   ========================================= */
@media (max-width: 992px) {
    
    /* 1. الحاوية العامة */
    .woocommerce-checkout form.checkout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    /* 2. تصغير العرض (إضافة هوامش جانبية) */
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review {
        width: auto !important; /* إلغاء العرض الكامل */
        margin-left: 15px !important;  /* مسافة من اليسار */
        margin-right: 15px !important; /* مسافة من اليمين */
        padding: 20px !important;
        border-radius: 12px !important; /* تدوير الحواف ليبرز كبطاقة */
    }

    /* 3. إلغاء التثبيت */
    .woocommerce-checkout #order_review {
        position: static !important;
        border: 2px solid var(--naf-gold) !important;
    }

    /* 4. تصغير حقول الإدخال لتتناسب مع العرض الجديد */
    .woocommerce-checkout input,
    .woocommerce-checkout select,
    .woocommerce-checkout textarea {
        font-size: 14px !important; /* تصغير الخط شوي */
        min-height: 40px !important; /* ارتفاع أنعم */
        padding: 0 10px !important;
    }
    
    .woocommerce-checkout label {
        font-size: 0.85rem !important;
    }

    /* 5. زر الدفع */
    #payment #place_order {
        width: 100% !important;
        font-size: 1rem !important;
        padding: 12px !important;
    }
    
    /* 6. منع خروج الجدول عن الإطار */
    .woocommerce-checkout table.shop_table {
        font-size: 0.85rem !important;
    }
    .woocommerce-checkout table.shop_table td {
        word-break: break-word;
    }
}

/* =========================================
   21. CHECKOUT FINAL POLISH (COMPACT & SPACED)
   ========================================= */

/* 1. تنسيق الشبكة (فصل العمودين + مسافة عن الفوتر) */

.woocommerce-checkout form.checkout {
    display: grid !important;
    grid-template-columns: 1.6fr 1fr !important;
    
    /* هنا السر: فصلنا المسافة الأفقية عن العمودية */
    column-gap: 80px !important;  /* مسافة كبيرة بين اليمين واليسار */
    row-gap: 1px !important;     /* مسافة صغيرة جداً بين رسالة الخطأ والجدول */
    
    margin-bottom: 100px !important;
    align-items: start !important;
}

/* 2. الصناديق (جعلها على قد المحتوى بالضبط) */
.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review {
    background: #fff;
    padding: 25px !important;
    border-radius: 12px;
    height: fit-content !important; /* يمنع أي بياض زائد تحت */
}

/* 3. ضغط جدول "ملخص الطلب" (Compact Summary) */
.woocommerce-checkout table.shop_table {
    margin-bottom: 10px !important;
    border: none !important;
}

.woocommerce-checkout table.shop_table th, 
.woocommerce-checkout table.shop_table td {
    padding: 8px 0 !important; /* تقليل الفراغ بين المنتجات */
    font-size: 0.9rem !important;
    border-bottom: 1px solid #f5f5f5 !important;
}

/* تصغير خط المجموع الكلي */
.woocommerce-checkout table.shop_table .order-total th,
.woocommerce-checkout table.shop_table .order-total td {
    padding-top: 15px !important;
    font-size: 1.1rem !important;
}

/* 4. تنسيق منطقة الدفع (Ultra Compact) */
#payment {
    background: transparent !important;
    padding: 0 !important;
}

#payment ul.payment_methods {
    border-bottom: none !important; /* إزالة الخط الفاصل */
    margin-bottom: 10px !important;
    padding: 0 !important;
}

/* إخفاء صندوق الوصف الرمادي "Pay with cash..." لتوفير المساحة */
/* (لأن العنوان "Cash on delivery" كافي وواضح) */
#payment div.payment_box {
    display: none !important; 
}

/* 5. زر الدفع */
#payment #place_order {
    margin-top: 15px !important;
    padding: 15px !important;
}

/* 6. تحسينات الموبايل (إبقاء المسافة عن الفوتر) */
@media (max-width: 992px) {
    .woocommerce-checkout form.checkout {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        margin-bottom: 60px !important; /* مسافة موبايل */
    }
}


/* =========================================
   22. CUSTOM CHECKBOXES (ROYAL GOLD)
   ========================================= */

/* تغيير لون المربع عند التحديد */
.woocommerce-checkout input[type="checkbox"] {
    accent-color: var(--naf-gold); /* تقنية حديثة تدعمها كل المتصفحات */
    cursor: pointer;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* تنسيق النص بجانب المربع */
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--naf-dark);
}

/* تحسين رابط الشروط والأحكام */
.woocommerce-checkout .woocommerce-terms-and-conditions-link,
.woocommerce-checkout .naf-terms-link {
    color: var(--naf-gold) !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    transition: 0.3s;
}

.woocommerce-checkout .naf-terms-link:hover {
    color: var(--naf-dark) !important;
}

/* =========================================
   23. FIX CHECKOUT ERROR LAYOUT (GRID BUG FIX)
   ========================================= */

/* إجبار رسالة الخطأ تأخذ العرض الكامل عشان ما تخرب العمودين */
.woocommerce-checkout form.checkout .woocommerce-NoticeGroup,
.woocommerce-checkout form.checkout .woocommerce-error,
.woocommerce-checkout form.checkout .woocommerce-info {
    grid-column: 1 / -1 !important; /* يعني: تمدد من أول خط لآخر خط */
    width: 100% !important;
    margin-bottom: 30px !important;
}

/* تجميل رسالة الخطأ لتناسب الثيم (بدل الأحمر الفاقع الافتراضي) */
.woocommerce-checkout .woocommerce-error {
    background-color: #fff !important;
    color: var(--naf-dark) !important;
    border-top: 3px solid #d93025 !important; /* أحمر داكن للأخطاء */
    border-radius: 6px;
    padding: 15px 20px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    list-style: none !important;
}

.woocommerce-checkout .woocommerce-error li {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* إضافة أيقونة تنبيه قبل النص */
.woocommerce-checkout .woocommerce-error li::before {
    content: '\f071'; /* أيقونة تنبيه FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #d93025;
}

/* =========================================
   24. ROYAL FOOTER PACKAGE
   ========================================= */

/* 1. الحاوية الأساسية */
.site-footer-wrapper {
    padding-top: 20px;
    padding-bottom: 5px;
    border-top: 5px solid var(--naf-gold); /* الخط الذهبي العلوي */
    font-size: 0.95rem;
}

/* 2. الشبكة (Grid) */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 أعمدة متساوية */
    gap: 50px;
    margin-bottom: 1px;
}

/* 3. العناوين (Widgets Title) */
.footer-widget .widget-title {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

/* خط صغير تحت العنوان */
.footer-widget .widget-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--naf-gold); /* يأخذ اللون الذهبي */
    position: absolute;
    bottom: 0;
    left: 0;
}

/* 4. القوائم والروابط (تنظيف وتجميل) */
.footer-widget ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-widget ul li {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* خط فاصل خفيف جداً */
    padding-bottom: 12px;
}

.footer-widget ul li:last-child {
    border-bottom: none;
}

.footer-widget ul li a {
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

/* إضافة سهم صغير قبل الروابط أوتوماتيكياً */
.footer-widget ul li a::before {
    content: '\f105'; /* سهم FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
    color: var(--naf-gold);
    transition: margin-right 0.3s;
}

/* هوفر الروابط */
.footer-widget ul li a:hover {
    color: var(--naf-gold) !important;
    padding-left: 5px; /* حركة ناعمة */
}

.footer-widget ul li a:hover::before {
    margin-right: 15px; /* السهم يبعد شوي */
}

/* 5. شريط الحقوق السفلي */
.footer-bottom {
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* =========================================
   26. FOOTER MOBILE SIDE-BY-SIDE FIX
   ========================================= */
@media (max-width: 768px) {
    
    .site-footer-wrapper {
        padding-top: 10px !important; /* تقليل الحافة العلوية */
        padding-bottom: 10px !important;
    }

    /* 1. إجبار الشبكة تكون 3 أعمدة جنب بعض */
    .footer-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; /* ثلاثية دائماً */
        gap: 8px !important; /* مسافة صغيرة جداً بين الأعمدة */
        text-align: left !important; /* المحاذاة لليسار أرتب في المساحات الضيقة */
        margin-bottom: 10px !important;
    }

    /* 2. تصغير عناوين الويدجات */
    .footer-widget .widget-title {
        font-size: 0.7rem !important; /* خط عنوان صغير */
        font-weight: 700 !important;
        margin-bottom: 8px !important;
        padding-bottom: 5px !important;
        letter-spacing: 0 !important;
    }

    /* تصغير الخط الذهبي تحت العنوان */
    .footer-widget .widget-title::after {
        width: 20px !important;
        height: 2px !important;
        left: 0 !important; /* محاذاة لليسار */
        transform: none !important;
    }

    /* 3. تصغير الروابط والنصوص */
    .footer-widget ul li {
        margin-bottom: 5px !important;
        padding-bottom: 5px !important;
        border-bottom-width: 1px !important;
    }

    .footer-widget ul li a,
    .footer-col-area p,
    .footer-widget {
        font-size: 0.6rem !important; /* خط صغير جداً جداً */
        line-height: 1.4 !important;
        justify-content: flex-start !important; /* محاذاة السهم والنص لليسار */
        word-break: break-word !important; /* كسر الكلمات الطويلة عشان ما تخرب العمود */
    }

    /* تصغير السهم الصغير قبل الرابط */
    .footer-widget ul li a::before {
        font-size: 0.6rem !important;
        margin-right: 3px !important;
    }

    /* 4. تنسيق الشريط السفلي (STACKED CENTER) يبقى كما هو */
    .footer-bottom-inner {
        flex-direction: column-reverse !important;
        gap: 10px !important;
    }
    .naf-footer-nav {
        gap: 15px !important;
    }
    .naf-footer-nav li a {
        font-size: 0.75rem !important;
    }
    .copyright-text {
        font-size: 0.7rem !important;
    }
}
/* =========================================
   8. MOBILE RESPONSIVE (CRITICAL OVERRIDES)
   ========================================= */
@media (max-width: 768px) {
    /* --- General Layout --- */
    .container { padding: 0 15px; }
    
    /* --- Header Stacking --- */
    .naf-main-row > .container { display: flex; flex-direction: row !important; flex-wrap: wrap !important; padding: 10px 15px; gap: 10px; }
    .naf-logo-area { order: 1; flex: 0 0 100%; justify-content: center; margin-bottom: 10px; border-bottom: 1px solid #f9f9f9; padding-bottom: 10px; }
    .logo-link-wrapper { flex-direction: column !important; gap: 5px; }
    .naf-socials-area { order: 2; flex: 0 0 50%; justify-content: flex-start !important; }
    .naf-icons-area { order: 3; flex: 0 0 50%; justify-content: flex-end !important; }
    
/* --- Mobile Menu Logic (Left Aligned & Clean) --- */
    .naf-bottom-row .container { padding: 10px 15px; display: flex; flex-wrap: wrap; justify-content: space-between; }
    .mobile-toggle-btn { display: block !important; order: 1; font-size: 1.4rem; }
    .naf-bottom-actions { order: 2; justify-content: flex-end; width: auto !important; }
    
    .nav-wrapper { display: none; order: 3; width: 100%; border-top: 1px solid #f1f1f1; margin-top: 10px; }
    .main-navigation.toggled, .nav-wrapper.show-menu, .bottom-col-left:has(.toggled) { display: block !important; }

    /* 1. القائمة (UL) - محاذاة لليسار وإزالة النقاط */
    .naf-bottom-nav {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start !important; /* محاذاة لليسار */
        list-style: none !important; /* إزالة النقاط */
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 2. العناصر (LI) */
    .naf-bottom-nav li {
        width: 100%;
        text-align: left !important; /* محاذاة لليسار */
        list-style: none !important; /* تأكيد إزالة النقاط */
        margin: 0 !important;
        border-bottom: 1px solid #f9f9f9;
    }
    
    /* 3. تنسيق الروابط (مسافة بادئة وهوفر) */
    .naf-bottom-nav li a {
        display: block;
        padding: 12px 20px !important; /* مسافة 20px عن اليسار */
        text-decoration: none;
        color: var(--naf-text); /* استخدام لون النص العام */
        font-weight: 700;
        text-transform: uppercase;
        transition: all 0.3s ease;
    }

    .naf-bottom-nav li a:hover {
        color: var(--naf-gold) !important;
        padding-left: 25px !important; /* حركة بسيطة لليمين */
        background-color: #fafafa;
    }
    /* --- Category Grid Fix --- */
    .cats-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 20px 15px !important; padding: 0 5px; }
    .cat-box { flex: initial !important; width: 100% !important; min-width: 0 !important; height: auto !important; padding: 15px 5px !important; margin: 0 !important; }
    .cat-icon i { font-size: 1.8rem; margin-bottom: 8px; }
    .cat-title { font-size: 0.8rem; }
    
    /* --- Footer & Loop --- */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    
    
    /* --- Force 2 Columns (The User's Favorite Fix) --- */
    
    /* 1. الحاوية (الشبكة) */
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .woocommerce ul.products[class*="columns-"] { /* هذا السطر عشان يزبط الشورت كود */
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* عمودين بالتساوي */
        
        /* المسافة اللي انت طلبتها بالضبط */
        gap: 35px 15px !important; 
        
        margin-bottom: 40px !important;
        padding: 0 !important;
    }

    /* 2. العنصر (الكرت) */
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product,
    .woocommerce ul.products li.product-category { 
        padding: 10px !important;
        float: none !important;
        width: auto !important; /* تركنا العرض تلقائي عشان ما يتفعص */
        margin: 0 !important; /* المسافة بتيجي من الـ gap اللي فوق */
    }

    /* 3. الزر */
    .woocommerce ul.products li.product .button { 
        font-size: 0.7rem; 
        padding: 8px 0; 
    }
    

    
    /* --- Single Product (Mobile Layout) --- */
    .single-product .container { padding-top: 15px !important; }
    .woocommerce div.product { flex-direction: column; gap: 15px; margin-top: 0 !important; }
    .woocommerce div.product div.images, .woocommerce div.product div.summary { flex: 0 0 100%; width: 100% !important; }
    
    .woocommerce div.product div.images img { border-radius: 0 !important; border: none !important; box-shadow: none !important; max-height: 350px; margin: 0 auto; }
    .woocommerce div.product .product_title { font-size: 1.4rem !important; text-align: center; margin-bottom: 5px !important; }
    
    /* تعديل السعر للموبايل (نص نظيف بدون صندوق) */
    .woocommerce div.product p.price { 
        justify-content: center; 
        font-size: 1.3rem !important; 
        margin-bottom: 15px !important; 
        /* إلغاء الستايل عشان ما يطلع مربع فاضي */
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }
    
    /* إخفاء أي نصوص أو نقاط افتراضية فوق عناصر السلة */
    .woocommerce-cart table.cart td::before {
        content: none !important;
        display: none !important;
    }
    
    
    .woocommerce div.product form.cart { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 0 !important; background: #fff; padding: 12px; border-radius: 12px; border: 1px solid #f0f0f0; margin-bottom: 25px; }
    
    .single-product .quantity { flex: 0 0 auto !important; margin: 0 20px 0 0 !important; }
    .single-product .quantity .input-text.qty { width: 35px !important; height: 43px !important; font-size: 1rem !important; }
    .minus-btn, .plus-btn { width: 35px !important; height: 43px !important; border-radius: 6px; }
    
    .single-product div.product button.single_add_to_cart_button { flex: 1 !important; width: auto !important; height: 45px !important; font-size: 1.2rem !important; padding: 0 10px !important; white-space: nowrap; }
    
    .woocommerce-product-details__short-description { text-align: center; }
    .woocommerce div.product .woocommerce-tabs ul.tabs { justify-content: center; gap: 10px; }

    /* --- Cart Page (Mobile Grid) --- */
    .woocommerce-cart table.cart thead { display: none; }
    .woocommerce-cart table.cart tr.cart_item { display: grid; grid-template-columns: 100px 1fr; background: #fff; border: 1px solid #f0f0f0; border-radius: 12px; margin-bottom: 20px; position: relative; overflow: hidden; min-height: 120px; }
    .woocommerce-cart table.cart td { border: none !important; padding: 0 !important; display: block; }
    
    /* Force Image Show */
    .woocommerce-cart table.cart td.product-thumbnail { display: block !important; grid-column: 1; grid-row: 1 / span 5; width: 100% !important; height: 100% !important; background: #f9f9f9; }
    .woocommerce-cart table.cart td.product-thumbnail a, .woocommerce-cart table.cart td.product-thumbnail img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; border: none !important; border-radius: 0 !important; }
    
    /* Info Right Side */
    .woocommerce-cart table.cart td.product-name { grid-column: 2; padding: 15px 35px 5px 15px !important; font-size: 0.9rem !important; line-height: 1.3; }
    .woocommerce-cart table.cart td.product-price { grid-column: 2; padding: 0 15px 5px 15px !important; font-size: 0.85rem; color: #666; }
    .woocommerce-cart table.cart td.product-quantity { grid-column: 2; padding: 0 15px 15px 15px !important; }
    
    .woocommerce-cart .quantity .input-text.qty { width: 30px !important; height: 30px !important; }
    .minus-btn, .plus-btn { width: 25px; height: 30px; font-size: 1rem; }
    
    /* Remove Button */
    .woocommerce-cart table.cart td.product-remove { position: absolute; top: 5px; right: 5px; z-index: 10; width: auto !important; }
    .woocommerce-cart table.cart .product-remove a { width: 24px; height: 24px; font-size: 1rem; background: #eee; color: #888 !important; }
    
    /* Coupon & Totals */
    .woocommerce-cart table.cart td.actions { display: block; grid-column: 1 / -1; width: 100%; padding: 10px !important; }
    .cart-collaterals .cart_totals { width: 100% !important; float: none !important; margin: 30px auto 80px auto !important; padding: 20px !important; box-sizing: border-box !important; }
    .wc-proceed-to-checkout a.checkout-button { width: 100% !important; box-sizing: border-box !important; margin: 0 !important; }
}



/* =========================================
   27. MY ACCOUNT (SINGLE BOX TOGGLE MODE & BUTTONS)
   ========================================= */

/* 1. الحاوية (توسيط البوكس) */
#customer_login {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    margin: 60px 0 !important;
    min-height: 450px;
}

/* 2. تنسيق الصناديق (Cards) */
.u-column1, .u-column2 {
    width: 100% !important;
    max-width: 450px !important;
    background-color: #ffffff;
    padding: 40px !important;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
    float: none !important;
    margin: 0 !important;
}

/* إخفاء صندوق التسجيل افتراضياً */
.u-column2 { display: none; }

/* 3. العناوين */
#customer_login h2 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--naf-dark);
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid #f9f9f9;
    padding-bottom: 15px;
}

/* 4. الحقول (Inputs) */
.woocommerce-account form .form-row {
    padding: 0; margin: 0 0 15px 0; width: 100%;
}
.woocommerce-account input.input-text {
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    width: 100% !important;
    height: 50px !important;
    outline: none;
    box-sizing: border-box !important;
}
.woocommerce-account input.input-text:focus {
    background: #fff; border-color: var(--naf-gold);
    box-shadow: 0 0 0 3px rgba(228, 181, 75, 0.1);
}

/* 5. الأزرار (Buttons) - ستايل ملكي إجباري */
/* نستهدف كل أنواع أزرار الووكومرس في هذه الصفحة */
.woocommerce-account button.button,
.woocommerce-account input[type="submit"],
#customer_login button[name="login"],
#customer_login button[name="register"] {
    width: 100% !important;
    background-color: var(--naf-dark) !important; /* كحلي */
    color: var(--naf-gold) !important; /* ذهبي */
    padding: 15px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    border: none !important;
    transition: all 0.3s ease !important;
    margin-top: 10px !important;
    float: none !important;
    height: auto !important;
    cursor: pointer;
}

/* هوفر الأزرار */
.woocommerce-account button.button:hover,
.woocommerce-account input[type="submit"]:hover,
#customer_login button[name="login"]:hover,
#customer_login button[name="register"]:hover {
    background-color: var(--naf-gold) !important; /* ذهبي */
    color: var(--naf-dark) !important; /* كحلي */
    transform: translateY(-2px);
}

/* 6. روابط التبديل (Toggle Links) */
.woocommerce-LostPassword, .text-center {
    margin-bottom: 0 !important;
    font-size: 0.9rem;
    margin-top: 20px !important;
    text-align: center;
}
.naf-sep { margin: 0 10px; color: #ddd; }
.naf-toggle-link, .woocommerce-LostPassword a {
    cursor: pointer; color: var(--naf-dark); font-weight: 700; transition: 0.3s; text-decoration: underline;
}
.naf-toggle-link:hover, .woocommerce-LostPassword a:hover { color: var(--naf-gold); }



/* =========================================
   28. LOST PASSWORD PAGE STYLES
   ========================================= */

/* تحويل نموذج استعادة كلمة المرور إلى صندوق متوسط */
.woocommerce-account form.lost_reset_password {
    max-width: 450px; /* نفس عرض صندوق الدخول */
    margin: 60px auto; /* توسيط في الصفحة */
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

/* تنسيق نص التعليمات */
.woocommerce-account form.lost_reset_password p {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* التأكد أن زر الاستعادة يأخذ نفس الستايل الملكي */
.woocommerce-account form.lost_reset_password button[type="submit"] {
    width: 100% !important;
    margin-top: 10px;
    /* الستايل الأساسي مأخوذ من القسم 27 أعلاه */
}




/* =========================================
   29. MY ACCOUNT DASHBOARD (ROYAL SIDEBAR)
   ========================================= */

/* 1. الحاوية الرئيسية (Flex Layout) */
.woocommerce-account .woocommerce {
    display: flex !important;
    gap: 40px !important;
    align-items: flex-start !important; /* عشان القائمة ما تمط مع المحتوى */
    margin-top: 40px;
    padding-bottom: 25px !important;
}

/* 2. القائمة الجانبية (Sidebar Menu) */
.woocommerce-MyAccount-navigation {
    flex: 0 0 280px !important; /* عرض ثابت للقائمة */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    overflow: hidden; /* عشان الزوايا */
    padding: 10px 0;
    border: 1px solid rgba(0,0,0,0.02);
}

.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    border-bottom: 1px solid #f9f9f9;
}
.woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}

/* تنسيق الروابط */
.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 25px;
    text-decoration: none;
    color: var(--naf-text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 4px solid transparent; /* تحضير الخط الذهبي */
}

/* تأثير الهوفر والنشط (Active) */
.woocommerce-MyAccount-navigation li a:hover,
.woocommerce-MyAccount-navigation li.is-active a {
    background-color: #fdfdfd;
    color: var(--naf-dark);
    border-left-color: var(--naf-gold); /* ظهور الخط الذهبي */
    padding-left: 30px; /* حركة ناعمة لليمين */
}

/* زر تسجيل الخروج (لون أحمر خفيف عند الهوفر للتمييز) */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    color: #d93025;
    border-left-color: #d93025;
    background-color: #fff5f5;
}

/* 3. منطقة المحتوى (Content Area) */
.woocommerce-MyAccount-content {
    flex: 1 !important; /* تأخذ باقي المساحة */
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ترحيب الداشبورد */
.woocommerce-MyAccount-content p {
    color: #555;
    margin-bottom: 20px;
}

/* الروابط داخل المحتوى (مثل "edit password") */
.woocommerce-MyAccount-content a {
    color: var(--naf-gold);
    font-weight: 700;
    text-decoration: underline;
}
.woocommerce-MyAccount-content a:hover {
    color: var(--naf-dark);
}

/* العناوين داخل الداشبورد */
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    font-size: 1.4rem;
    color: var(--naf-dark);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 4. استجابة الموبايل (Stacking) */
@media (max-width: 992px) {
    .woocommerce-account .woocommerce {
        flex-direction: column !important; /* القائمة فوق والمحتوى تحت */
        gap: 20px !important;
    }

    .woocommerce-MyAccount-navigation {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 10px;
    }
    
    /* تحسين القائمة للموبايل لتصير أصغر */
    .woocommerce-MyAccount-navigation li a {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .woocommerce-MyAccount-content {
        padding: 25px;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}


/* =========================================
   30. MY ACCOUNT EMPTY STATES (ORDERS & DOWNLOADS)
   ========================================= */

/* 1. تنسيق حاوية الرسالة (تحويلها لبطاقة) */
.woocommerce-MyAccount-content .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-message {
    background-color: #fcfcfc !important;
    border: 2px dashed #e0e0e0 !important; /* إطار منقط يوحي بالفراغ */
    border-radius: 12px;
    padding: 40px !important;
    text-align: center;
    color: #666 !important;
    font-size: 1.1rem;
    
    /* فليكس لترتيب العناصر فوق بعض */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    
    /* إلغاء ستايلات ووكومرس القديمة */
    margin-bottom: 30px !important;
    box-shadow: none !important;
    list-style: none !important;
}

/* 2. إضافة أيقونة كبيرة (Shopping Bag) */
.woocommerce-MyAccount-content .woocommerce-info::before,
.woocommerce-MyAccount-content .woocommerce-message::before {
    content: '\f290' !important; /* أيقونة حقيبة من FontAwesome */
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 3.5rem !important;
    color: var(--naf-gold) !important;
    
    /* إلغاء التموضع المطلق القديم */
    position: static !important;
    display: block !important;
    margin-bottom: 10px !important;
}

/* 3. تنسيق زر "Browse Products" */
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content .button {
    background-color: var(--naf-dark) !important;
    color: var(--naf-gold) !important;
    padding: 12px 30px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    
    /* إلغاء الطفو (Float) */
    float: none !important;
    margin-top: 10px !important;
    display: inline-block !important;
}

/* هوفر الزر */
.woocommerce-MyAccount-content .woocommerce-Button:hover,
.woocommerce-MyAccount-content .button:hover {
    background-color: var(--naf-gold) !important;
    color: var(--naf-dark) !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(5, 16, 42, 0.15);
}



/* =========================================
   31. ORDER RECEIVED PAGE (ROYAL INVOICE STYLE)
   ========================================= */

/* 1. رسالة الشكر (Banner) */
.woocommerce-order p.woocommerce-notice--success {
    background-color: var(--naf-gold) !important;
    color: var(--naf-dark) !important;
    padding: 25px !important;
    text-align: center;
    font-weight: 800;
    font-size: 1.4rem;
    border-radius: 8px;
    margin-bottom: 40px !important;
    box-shadow: 0 10px 30px rgba(228, 181, 75, 0.2);
    position: relative;
    overflow: hidden;
}

/* إضافة أيقونة "صح" كبيرة كخلفية جمالية */
.woocommerce-order p.woocommerce-notice--success::after {
    content: '\f00c'; /* أيقونة الصح */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.1;
}

/* 2. شريط معلومات الطلب (تحويله لبطاقات) */
ul.woocommerce-order-overview {
    display: flex !important;
    justify-content: space-between;
    list-style: none !important;
    padding: 0 !important;
    margin-bottom: 50px !important;
    gap: 20px;
    flex-wrap: wrap;
}

ul.woocommerce-order-overview li {
    background: #ffffff;
    flex: 1; /* توزيع متساوي */
    padding: 20px !important;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.03) !important;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    margin: 0 !important;
    border-top: 4px solid var(--naf-dark) !important; /* لمسة كحلية من فوق */
    min-width: 140px;
}

/* عناوين البطاقات (رقم الطلب، التاريخ...) */
ul.woocommerce-order-overview li {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
}

/* القيم داخل البطاقات (الرقم الفعلي) */
ul.woocommerce-order-overview li strong {
    display: block;
    margin-top: 10px;
    font-size: 1.1rem;
    color: var(--naf-dark);
    font-weight: 800;
}

/* 3. تفاصيل الطلب (Order Details Table) */
.woocommerce-order-details {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    border: 1px solid rgba(0,0,0,0.02);
}

.woocommerce-order-details h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--naf-dark);
    border-bottom: 2px solid #f9f9f9;
    padding-bottom: 15px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

/* تنسيق الجدول */
.woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-table--order-details th {
    text-align: left;
    padding: 15px 0;
    color: var(--naf-dark);
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

.woocommerce-table--order-details td {
    padding: 15px 0;
    border-bottom: 1px solid #f9f9f9;
    color: #555;
}

.woocommerce-table--order-details td a {
    color: var(--naf-dark);
    font-weight: 700;
    text-decoration: none;
}

/* المجموع الكلي (Highlight) */
.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td {
    border-top: 2px solid #eee;
    border-bottom: none;
    font-size: 1.2rem;
    color: var(--naf-gold); /* ذهبي */
    padding-top: 20px;
    font-weight: 800;
}

/* 4. عنوان الفاتورة (Billing Address) */
.woocommerce-customer-details {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.woocommerce-customer-details h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--naf-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.woocommerce-customer-details address {
    font-style: normal;
    background: #fcfcfc;
    border: 1px dashed #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    color: #666;
    line-height: 1.8;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    /* ترتيب بطاقات المعلومات فوق بعض */
    ul.woocommerce-order-overview {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    ul.woocommerce-order-overview li {
        width: 100%;
        border-top: none !important;
        border-left: 4px solid var(--naf-dark) !important; /* نغير الخط ليصير عاليسار أحلى */
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px !important;
    }
    
    ul.woocommerce-order-overview li strong {
        margin-top: 0;
    }
    
    /* ضغط البوكسات */
    .woocommerce-order-details, 
    .woocommerce-customer-details {
        padding: 20px;
    }
    
    .woocommerce-order p.woocommerce-notice--success {
        font-size: 1.1rem;
        padding: 15px !important;
    }
}

/* =========================================
   34. MY ACCOUNT ADDRESSES (MOBILE WIDTH FIX)
   ========================================= */

/* 1. تنسيق بطاقة العنوان (Billing & Shipping) عالكمبيوتر */
.woocommerce-account .addresses .u-column1,
.woocommerce-account .addresses .u-column2 {
    width: 48% !important; /* جنب بعض عالديسكتوب */
    float: left !important;
    margin-right: 4% !important; /* مسافة بينهم */
    
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    
    /* هذا السطر بيضمن ان الحشوة تنحسب من ضمن العرض */
    box-sizing: border-box !important; 
    margin-bottom: 30px;
}

/* إلغاء المارجن للعمود الأخير عشان ما ينزل */
.woocommerce-account .addresses .u-column2 {
    margin-right: 0 !important;
}

/* تنسيق عنوان البطاقة (Billing Address) */
.woocommerce-account .addresses header.title h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--naf-dark);
    margin-bottom: 20px;
    display: inline-block;
}

/* تنسيق زر التعديل (Edit) */
.woocommerce-account .addresses header.title a.edit {
    float: right;
    color: var(--naf-gold);
    font-weight: 700;
    text-decoration: underline;
    font-size: 0.9rem;
}

/* تنسيق نص العنوان نفسه */
.woocommerce-account address {
    font-style: normal;
    color: #666;
    line-height: 1.8;
}

/* --- MOBILE FIX (CRITICAL) --- */
@media (max-width: 768px) {
    .woocommerce-account .addresses .u-column1,
    .woocommerce-account .addresses .u-column2 {
        width: 100% !important; /* عرض كامل */
        float: none !important; /* إلغاء الطفو */
        margin-right: 0 !important;
        margin-bottom: 20px !important;
        padding: 20px !important; /* تقليل الحشوة للموبايل */
        
        /* الحل السحري لمشكلة "عريضة كثير" */
        box-sizing: border-box !important; 
        max-width: 100vw !important; /* ممنوع تتجاوز عرض الشاشة */
    }
    
    /* كسر الكلام الطويل (مثل العناوين الطويلة) عشان ما يمط البطاقة */
    .woocommerce-account address {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        width: 100% !important;
        display: block;
    }
}


/* =========================================
   35. DASHBOARD WELCOME TEXT STYLING
   ========================================= */

/* 1. تنسيق جملة الترحيب (Welcome back...) */
.woocommerce-MyAccount-content > p:first-child {
    font-size: 1.8rem !important; /* تكبير الخط */
    font-weight: 800 !important;
    color: var(--naf-dark) !important;
    margin-bottom: 15px !important;
    border-bottom: 2px solid #f9f9f9; /* خط فاصل خفيف */
    padding-bottom: 15px;
    text-transform: uppercase;
}

/* تلوين اسم المستخدم بالذهبي */
.woocommerce-MyAccount-content > p:first-child strong {
    color: var(--naf-gold) !important;
}

/* 2. تنسيق جملة الشرح الثانية */
.woocommerce-MyAccount-content > p:nth-child(2) {
    font-size: 1rem !important;
    color: #666 !important;
    margin-bottom: 30px !important;
}