/*
Theme Name: Voltag Minimal Shop
Theme URI: https://Voltag.ir
Author: Voltag Team
Description: A minimal, fast, and RTL WooCommerce theme.
Version: 86.1.7 (Optimized)
Text Domain: VOLTAG
*/

/* =========================================
   0. Variables (CSS Custom Properties)
   ========================================= */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-bg: #1e293b;
    --text-main: #374151;
    --text-dark: #111827;
    --text-light: #6b7280;
    --bg-body: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f1f5f9;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --star-color: #f59e0b;
    
    /* Fonts */
    --font-main: 'Vazir', sans-serif;
    
    /* Grids */
    --gama-cols: 4;
}

/* =========================================
   1. Global & Reset
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    direction: rtl;
    unicode-bidi: embed;
    font-family: var(--font-main);
    font-size: 15px;
    overflow-x: hidden;
    display: flex; flex-direction: column; min-height: 100vh;
    width: 100%;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* Fonts */
@font-face { font-family: 'Vazir'; src: url('assets/fonts/Vazirmatn-UI-FD-Regular.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazir'; src: url('assets/fonts/Vazirmatn-UI-FD-Bold.woff2') format('woff2'); font-weight: bold; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazir'; src: url('assets/fonts/Vazirmatn-UI-FD-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

body, h1, h2, h3, input, button, select, textarea { font-family: var(--font-main); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Global Content Spacing */
#content { flex: 1; padding-bottom: 60px; padding-top: 20px !important; }
body.single-product #content { padding-top: 0px !important; }
body.home .entry-header, body.home .page-header { display: none !important; }

/* Remove empty WP tags */
.entry-content p:empty { display: none; }
body.home .entry-content { padding: 0 !important; margin: 0 !important; box-shadow: none !important; border: none !important; background: transparent !important; }

/* =========================================
   2. Header & Navigation
   ========================================= */
header.site-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.04);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(255,255,255,0.6);
    transition: 0.3s;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.site-branding img { max-height: 38px; }
.site-title a { font-size: 1.5rem; font-weight: 900; color: #333; }

/* Desktop Menu */
@media (min-width: 993px) {
    .main-navigation { flex-grow: 1; margin: 0 30px; height: 100%; position: relative; }
    .main-navigation > ul { display: flex; gap: 5px; height: 100%; align-items: center; }
    .main-navigation ul li { position: relative; height: 100%; display: flex; align-items: center; }
    .main-navigation ul li a { font-weight: 500; color: #4b5563; padding: 0 15px; height: 100%; display: flex; align-items: center; transition: 0.2s; }
    .main-navigation ul li:hover > a { color: var(--primary-color); background: rgba(37,99,235,0.05); border-radius: 8px; }
    
    .submenu-toggle, .mobile-menu-header, .mobile-menu-toggle { display: none; }
    
    .menu-item-has-children > a::after { content: ''; width: 5px; height: 5px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-right: 8px; margin-top: -3px; opacity: 0.6; display: inline-block; }
    
    .main-navigation ul ul.sub-menu {
        position: absolute; top: 100%; right: 0; background: var(--bg-white); width: 220px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.1); border-radius: 12px; border-top: 3px solid var(--primary-color);
        display: block; visibility: hidden; opacity: 0; transform: translateY(15px); transition: 0.2s;
        padding: 10px 0; flex-direction: column; height: auto; align-items: flex-start; z-index: 100;
    }
    .main-navigation ul li:hover > ul.sub-menu { visibility: visible; opacity: 1; transform: translateY(0); }
    .main-navigation ul ul.sub-menu li { width: 100%; }
    .main-navigation ul ul.sub-menu li a { padding: 10px 20px; border-bottom: 1px solid var(--border-light); height: auto; }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9998; opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: blur(4px); }
body.mobile-menu-active .mobile-menu-overlay { opacity: 1; visibility: visible; }

.header-actions { flex-shrink: 0; }
.cart-icon { display: flex; align-items: center; gap: 8px; background: var(--bg-white); color: var(--text-main); padding: 8px 18px; border-radius: 50px; font-weight: 700; border: 1px solid var(--border-color); transition: 0.2s; }
.cart-icon:hover { border-color: var(--primary-color); color: var(--primary-color); }
.cart-count-badge { background: var(--danger-color); color: var(--bg-white); padding: 2px 6px; border-radius: 50%; min-width: 20px; text-align: center; font-size: 0.75rem; }
.cart-svg { width: 20px; height: 20px; stroke-width: 2px; }

/* =========================================
   3. Search Modal
   ========================================= */
.search-icon-btn { background: none; border: none; cursor: pointer; color: var(--text-main); padding: 8px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; }
.search-icon-btn:hover { background: #f3f4f6; color: var(--primary-color); }

.gama-search-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 99999; display: none; align-items: flex-start; justify-content: center; padding-top: 80px; transition: 0.3s; }
.gama-search-backdrop.active { display: flex; }
.gama-search-box { width: 90%; max-width: 650px; background: var(--bg-white); border-radius: 24px; box-shadow: 0 25px 60px rgba(0,0,0,0.3); overflow: hidden; transform: scale(0.95); transition: 0.2s; border: 1px solid rgba(255,255,255,0.2); }
.gama-search-backdrop.active .gama-search-box { transform: scale(1); }
.gama-search-header { display: flex; align-items: center; padding: 20px 25px; border-bottom: 1px solid var(--border-light); background: var(--bg-white); }
#gama-live-search-input { flex-grow: 1; border: none; background: transparent; font-family: var(--font-main); font-size: 1.2rem; font-weight: 700; color: var(--secondary-bg); padding: 0 15px; height: 50px; outline: none; }
#gama-live-search-input::placeholder { color: #cbd5e1; font-weight: 400; }
.gama-close-icon { background: #f8fafc; border: none; font-size: 1.5rem; color: #64748b; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.gama-close-icon:hover { background: #fee2e2; color: var(--danger-color); }

.gama-results-area { max-height: 450px; overflow-y: auto; background: #f8fafc; padding: 15px; }
.gama-search-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.search-item-link { display: flex; align-items: center; padding: 12px; text-decoration: none; background: var(--bg-white); border-radius: 16px; border: 1px solid transparent; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.search-item-link:hover { border-color: var(--primary-color); transform: translateX(-5px); box-shadow: 0 5px 15px rgba(37, 99, 235, 0.1); }
.s-thumb img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; margin-left: 15px; background: #f1f5f9; }
.s-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.s-title { font-weight: 700; color: #334155; font-size: 0.95rem; margin-bottom: 5px; }
.s-price { color: var(--primary-color); font-weight: 800; font-size: 0.9rem; }
.out-of-stock { color: var(--danger-color); font-size: 0.8rem; background: #fee2e2; padding: 2px 8px; border-radius: 20px; display: inline-block; width: fit-content; }
.s-arrow { color: #cbd5e1; transition: 0.2s; }
.search-item-link:hover .s-arrow { color: var(--primary-color); transform: translateX(-3px); }
.s-footer { text-align: center; margin-top: 10px; }
.s-footer a { display: inline-block; background: #e0e7ff; color: #3730a3; padding: 10px 25px; border-radius: 50px; font-weight: 700; font-size: 0.9rem; transition: 0.2s; }
.s-footer a:hover { background: #3730a3; color: var(--bg-white); }
.s-no-result { text-align: center; padding: 40px 20px; color: #64748b; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.s-no-result svg { width: 60px; height: 60px; opacity: 0.5; }
.gama-search-loader { display: none; width: 24px; height: 24px; border: 3px solid #e2e8f0; border-top-color: var(--primary-color); border-radius: 50%; animation: spin 0.8s infinite; margin-left: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   4. Page & Breadcrumb
   ========================================= */
.woocommerce-breadcrumb {
    font-size: 0.85rem; color: #94a3b8; margin: 0 0 20px 0 !important;
    display: flex; align-items: center; background: transparent !important;
    padding: 0 !important; border: none !important; box-shadow: none !important;
    flex-wrap: wrap; line-height: 1.5;
    /* Scroll settings for mobile (combined) */
    overflow-x: auto; overflow-y: hidden; white-space: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.woocommerce-breadcrumb::-webkit-scrollbar { display: none; }
.woocommerce-breadcrumb a { color: #64748b; font-weight: 500; transition: 0.2s; display: inline-block; }
.woocommerce-breadcrumb a:hover { color: var(--primary-color); }
.woocommerce-breadcrumb .delimiter, .gama-sep { margin: 0 5px; opacity: 0.4; font-size: 0.8em; display: inline-flex; align-items: center; color: #bbb; }
.gama-sep svg { width: 10px; height: 10px; }
.woocommerce-breadcrumb span:last-child { color: #334155; font-weight: 700; }
body.single-product .woocommerce-breadcrumb { margin-bottom: 15px !important; }

h1.entry-title, h1.page-title, .woocommerce-products-header__title.page-title {
    font-size: 1.6rem !important; font-weight: 800; color: var(--secondary-bg);
    margin-bottom: 20px !important; margin-top: 0 !important; text-align: center; line-height: 1.3;
}

.page .entry-content {
    background: var(--bg-white); padding: 30px; border-radius: 20px;
    box-shadow: 0 5px 20px -5px rgba(0,0,0,0.03); border: 1px solid var(--border-light); margin-bottom: 30px;
}

/* =========================================
   5. Product & WooCommerce
   ========================================= */
/* Single Product Layout */
body.single-product div.product {
    display: grid !important;
    grid-template-columns: 420px 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 5px !important; margin-top: 40px !important; margin-bottom: 80px !important;
    align-items: start !important; width: 100% !important;
}

body.single-product div.product > .woocommerce-product-gallery {
    grid-column: 1 / 2 !important; grid-row: 1 / 2 !important;
    position: relative; background: var(--bg-white); padding: 20px 20px 0 20px;
    width: 100% !important; border: 1px solid var(--border-light); border-bottom: none;
    border-radius: 24px 24px 0 0; z-index: 2;
}
.woocommerce-product-gallery img { border-radius: 16px; width: 100%; display: block; max-height: 400px; object-fit: contain; }
.woocommerce-product-gallery .flex-control-thumbs {
    display: flex; gap: 10px; margin-top: 20px !important; margin-bottom: 15px;
    justify-content: center; padding: 0; list-style: none;
}
.woocommerce-product-gallery .flex-control-thumbs li {
    width: 60px !important; height: 60px !important; flex-shrink: 0; border-radius: 12px;
    overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: 0.7; transition: 0.3s; margin: 0 !important;
}
.woocommerce-product-gallery .flex-control-thumbs li:hover,
.woocommerce-product-gallery .flex-control-thumbs li img.flex-active { opacity: 1; border-color: var(--primary-color); transform: translateY(-3px); }

body.single-product div.product > .entry-summary {
    grid-column: 2 / 3 !important; grid-row: 1 / span 3 !important;
    width: 100% !important; float: none !important; margin: 0 !important;
    display: flex !important; flex-direction: column !important; text-align: right;
}

/* Extras Box (Call, Share) */
.gama-extras-wrapper {
    grid-column: 1 / 2 !important; grid-row: auto !important;
    background: var(--bg-white); padding: 0 20px 20px 20px;
    border: 1px solid var(--border-light); border-top: none; border-radius: 0 0 24px 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.08); margin-top: -1px; z-index: 1;
}

.product_title { font-size: 1.8rem; font-weight: 900; color: var(--text-dark); line-height: 1.4; margin-bottom: 25px; text-align: right !important; }
.brand-rating-wrapper { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #f3f4f6; }
.product-brand-label { color: var(--text-light); font-size: 0.95rem; font-weight: 500; margin: 0 !important; }
.woocommerce-product-rating { margin: 0 !important; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; padding: 0 !important; border: none !important; }
.woocommerce-product-rating .star-rating { margin: 0 !important; float: none !important; color: var(--star-color); font-size: 1rem; }
.woocommerce-product-rating .woocommerce-review-link { font-size: 0 !important; text-decoration: none; display: flex; align-items: center; }
.woocommerce-product-rating .count { font-size: 0.85rem !important; background: #eff6ff; color: var(--primary-color); padding: 3px 10px; border-radius: 20px; font-weight: 800; }
.woocommerce-product-rating .woocommerce-review-link::after { content: 'دیدگاه'; font-size: 0.85rem; color: var(--text-light); margin-right: 5px; font-weight: 500; }

body.single-product p.price {
    background: #f0f9ff; border: 1px dashed #bae6fd; padding: 15px; border-radius: 12px;
    font-size: 1.6rem; font-weight: 900; color: #0284c7; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between;
}
body.single-product p.price::before { content: 'قیمت محصول:'; font-size: 0.9rem; color: #64748b; font-weight: 500; }
body.single-product p.price del { color: #9ca3af; font-size: 1rem; opacity: 0.7; font-weight: normal; text-decoration: line-through; margin-left: 10px; display: inline-block; }
body.single-product p.price ins { text-decoration: none; display: inline-block; }

.onsale {
    position: absolute; top: 20px; right: 20px; z-index: 10;
    background: var(--danger-color); color: var(--bg-white); font-weight: 800;
    padding: 5px 12px; border-radius: 99px; font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.woocommerce-product-details__short-description {
    font-size: 0.95rem; color: #4b5563; background: var(--bg-white);
    padding: 25px; border-radius: 20px; border: 1px solid #f3f4f6;
    margin-bottom: 30px; line-height: 1.8;
    white-space: normal !important; overflow-wrap: break-word; width: 100%;
}
.woocommerce-product-details__short-description li { margin-bottom: 8px; padding-right: 20px; position: relative; }
.woocommerce-product-details__short-description li::before { content: ''; width: 6px; height: 6px; background: var(--primary-color); border-radius: 50%; position: absolute; right: 0; top: 10px; }

form.cart {
    background: var(--bg-white); padding: 30px; border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08); border: 1px solid #f3f4f6;
    margin-bottom: 30px; position: relative; overflow: visible;
}
form.cart::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 4px; background: var(--primary-color); border-radius: 0 0 10px 10px; }

table.variations { width: 100%; margin-bottom: 25px; border-collapse: separate; border-spacing: 0 15px; }
table.variations label { font-weight: 700; color: var(--text-main); font-size: 0.95rem; }
table.variations select { width: 100%; padding: 14px 20px; border: 2px solid var(--border-color); border-radius: 14px; background: var(--bg-white); font-family: var(--font-main); cursor: pointer; transition: all 0.2s ease; }
table.variations select:focus { border-color: var(--primary-color); }
.reset_variations { font-size: 0.8rem; color: var(--danger-color); margin-top: 5px; display: inline-block; }

.woocommerce-variation-add-to-cart { display: flex; gap: 15px; }
.quantity { width: 80px; }
.quantity input { width: 100%; height: 55px; border: 2px solid var(--border-color); border-radius: 14px; text-align: center; font-size: 1.4rem; font-weight: bold; background: var(--bg-white); }

button.single_add_to_cart_button {
    flex-grow: 1; background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: var(--bg-white); height: 55px; border: none; border-radius: 14px;
    font-size: 1.1rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4); transition: all 0.3s ease;
}
button.single_add_to_cart_button:hover { transform: translateY(-3px); box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.5); }

.product_meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: var(--text-light); }
.product_meta a { background: var(--bg-white); border: 1px solid var(--border-color); color: #4b5563; padding: 6px 16px; border-radius: 99px; font-weight: 500; }

.woocommerce-tabs, .related.products { grid-column: 1 / -1 !important; width: 100% !important; margin-top: 60px; }
.woocommerce-tabs ul.tabs { display: flex; gap: 20px; border-bottom: none; margin-bottom: 25px; padding: 0; }
.woocommerce-tabs ul.tabs li { background: var(--bg-white); padding: 12px 30px; border-radius: 14px; border: 1px solid var(--border-color); cursor: pointer; transition: 0.3s; }
.woocommerce-tabs ul.tabs li.active { background: var(--primary-color); border-color: var(--primary-color); color: var(--bg-white); box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25); }
.woocommerce-tabs ul.tabs li a { font-weight: 700; color: var(--text-light); font-size: 1rem; }
.woocommerce-tabs ul.tabs li.active a { color: var(--bg-white); }
.woocommerce-Tabs-panel { background: var(--bg-white); padding: 40px; border-radius: 24px; border: 1px solid var(--border-color); line-height: 1.9; color: #4b5563; }

.gama-free-shipping { background: #ecfdf5; border: 1px dashed #34d399; color: #047857; border-radius: 12px; padding: 12px 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 15px; margin-top: 15px; font-size: 0.9rem; }
.gfs-icon { color: var(--success-color); display: flex; }

.gama-extra-buttons { display: flex; gap: 12px; margin-top: 20px; }
.geb-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 10px; border-radius: 12px; font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: all 0.2s ease; border: 1px solid transparent; cursor: pointer; background: var(--bg-white); }
.geb-btn svg { flex-shrink: 0; }
.geb-btn.call { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.geb-btn.call:hover { background: #f1f5f9; border-color: #cbd5e1; color: var(--secondary-bg); }
.geb-btn.whatsapp { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.geb-btn.whatsapp:hover { background: #bbf7d0; color: #14532d; }
.geb-btn.share { background: var(--bg-white); border: 1px solid #e2e8f0; color: #64748b; }
.geb-btn.share:hover { border-color: var(--primary-color); color: var(--primary-color); background: #eff6ff; }
.geb-btn.share.copied { background: var(--primary-color); color: var(--bg-white); border-color: var(--primary-color); }

/* =========================================
   6. Comments & Reviews
   ========================================= */
#comments, #reviews { margin-top: 40px; background: var(--bg-white); padding: 40px; border-radius: 24px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 1px solid #f1f3f5; }
#reply-title, .woocommerce-Reviews-title { font-size: 1.4rem; font-weight: 800; color: var(--text-dark); margin-bottom: 25px; display: block; border-bottom: 2px solid #f3f4f6; padding-bottom: 15px; }
.comment-list, .commentlist { list-style: none; margin: 0; padding: 0; }
.comment-list li, .commentlist li { margin-bottom: 25px; border-bottom: 1px solid var(--bg-body); padding-bottom: 25px; }
.comment-list li:last-child, .commentlist li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.comment-body { display: flex; gap: 20px; }
.comment-author .avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); padding: 2px; }
.comment-meta { margin-bottom: 5px; }
.fn { font-weight: 800; font-size: 1rem; color: var(--text-dark); font-style: normal; }
.comment-metadata a { font-size: 0.8rem; color: #9ca3af; text-decoration: none; margin-right: 10px; }
.comment-content p { font-size: 0.95rem; line-height: 1.7; color: #4b5563; margin-bottom: 10px; }
.reply a { background: #eff6ff; color: var(--primary-color); font-size: 0.8rem; padding: 4px 12px; border-radius: 50px; text-decoration: none; font-weight: 700; transition: 0.2s; }
.reply a:hover { background: var(--primary-color); color: var(--bg-white); }
.star-rating { color: var(--star-color); font-size: 0.9rem; margin-bottom: 5px; }

/* Comment Form */
#respond { margin-top: 30px; }
#respond label { font-weight: 700; color: var(--text-main); display: block; margin-bottom: 8px; font-size: 0.95rem; }
#respond input[type="text"], #respond input[type="email"], #respond textarea {
    width: 100%; padding: 16px 20px; border: 2px solid var(--border-color); border-radius: 12px;
    background-color: var(--bg-body); font-family: var(--font-main); font-size: 1rem; color: #1f2937;
    outline: none; box-shadow: none; transition: all 0.2s ease; margin-bottom: 20px;
}
#respond input:focus, #respond textarea:focus { border-color: var(--primary-color); background-color: var(--bg-white); box-shadow: 0 0 0 4px rgba(37,99,235,0.1) !important; }
#respond .submit {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: var(--bg-white); border: none;
    padding: 16px 40px; font-size: 1.1rem; font-weight: 800; border-radius: 12px; cursor: pointer;
    transition: 0.3s; box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4); display: inline-block;
}
#respond .submit:hover { transform: translateY(-3px); box-shadow: 0 15px 35px -5px rgba(37, 99, 235, 0.5); }
.comment-form-author, .comment-form-email, .comment-form-url { width: 100%; float: none !important; margin-bottom: 0; }

@media (min-width: 768px) {
    #respond form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .comment-form-author { grid-column: 1 / 2; }
    .comment-form-email { grid-column: 2 / 3; }
    .comment-form-url, .comment-form-comment, .form-submit, .comment-notes, .comment-form-cookies-consent, .comment-form-rating { grid-column: 1 / -1; }
    #respond input[type="text"], #respond input[type="email"] { margin-bottom: 0; }
}

.comment-form-cookies-consent { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 0.9rem; color: var(--text-light); }
.comment-form-cookies-consent input { width: auto !important; margin: 0; }
/* =========================================
   7. Footer & Contact
   ========================================= */

.site-footer {
    background-color: #1a1a2e;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #b0b0b0;
    font-size: 0.95rem;
    margin-top: 80px;
    position: relative;
    border-top: 4px solid #4f46e5;
}

.footer-widgets {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
}

/* ویجت‌ها و عنوان‌ها */
.footer-widget h4.footer-title {
    color: var(--bg-white);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-widget h4.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: #4f46e5;
    border-radius: 10px;
}

/* لینک‌های معمولی فوتر */
.footer-widget ul li a {
    color: #cbd5e1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-weight: 400;
    margin-bottom: 10px;
}

.footer-widget ul li a:hover {
    color: #4f46e5;
    padding-right: 5px;
}

/* --- اصلاحیه لیست تماس (رفع مشکل آیکون) --- */
.footer-widget .contact-list li {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-widget .contact-list li a {
    margin-bottom: 0 !important;
    display: inline-block !important;
    color: #cbd5e1;
}

.footer-widget .contact-list .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4f46e5;
}

/* تنظیم برای آدرس‌های چند خطی */
.footer-widget .contact-list li:nth-child(3) {
    align-items: flex-start !important;
}

.footer-widget .contact-list li:nth-child(3) .icon {
    margin-top: 5px;
}
/* ------------------------------------------- */

.footer-bottom {
    background-color: #11111d;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #6b7280;
    font-size: 0.85rem;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--bg-white);
    transition: 0.3s;
}

.social-btn:hover {
    background: #4f46e5;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

.trust-logos {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.trust-logos img {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 5px;
    width: 80px;
    height: auto;
    transition: 0.3s;
}

.trust-logos img:hover {
    transform: scale(1.05);
}
/* =========================================
   8. WooCommerce Account (Optimized & Full-Width)
   ========================================= */
.woocommerce-account.logged-in .woocommerce { display: flex; align-items: flex-start; gap: 30px; margin-top: 40px; }
.woocommerce-account.logged-in .woocommerce::before, .woocommerce-account.logged-in .woocommerce::after { display: none; }
.woocommerce-account:not(.logged-in) .woocommerce { display: block; margin: 40px auto; max-width: 1000px; }

/* Navigation & Content */
.woocommerce-MyAccount-navigation { background: var(--bg-white); border-radius: 20px; padding: 10px 0; box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 1px solid #f1f3f5; flex: 0 0 260px; width: 260px; }
.woocommerce-MyAccount-navigation-link a { display: flex; align-items: center; padding: 14px 25px; color: #4b5563; font-weight: 500; text-decoration: none; border-right: 4px solid transparent; }
.woocommerce-MyAccount-navigation-link.is-active a { background-color: #eff6ff; color: var(--primary-color); border-right-color: var(--primary-color); font-weight: 800; }
.woocommerce-MyAccount-content { background: var(--bg-white); border-radius: 20px; padding: 40px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 1px solid #f1f3f5; flex: 1; width: 100%; min-width: 0; }

/* Tables & Orders */
.woocommerce-order-details { margin-top: 30px; background: var(--bg-white); padding: 30px; border-radius: 20px; border: 1px solid #f1f3f5; }
.woocommerce-table--order-details { width: 100%; border-collapse: collapse; table-layout: fixed; }
.woocommerce-table--order-details th { background-color: #f8fafc; padding: 15px; text-align: right; border-bottom: 2px solid #e2e8f0; }
.woocommerce-table--order-details td { padding: 15px; border-bottom: 1px solid #f1f5f9; word-wrap: break-word; }

/* Mobile Optimization (Max Width 768px) */
@media (max-width: 768px) {
    .woocommerce-account .site-content .container, .woocommerce-account .entry-content, .woocommerce-account .site-main, .woocommerce-account article { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; max-width: 100% !important; width: 100% !important; }
    .woocommerce-account.logged-in .woocommerce { flex-direction: column; gap: 10px; margin-top: 0; }
    .woocommerce-MyAccount-content { padding: 20px 10px !important; border-radius: 0; border: none; box-shadow: none; background: transparent; }
    .woocommerce-MyAccount-navigation { width: 100%; border-radius: 0; border: none; border-bottom: 1px solid #eee; display: flex; overflow-x: auto; white-space: nowrap; background: #fff; position: sticky; top: 0; z-index: 10; }
    .woocommerce-MyAccount-navigation-link a { padding: 15px 20px; font-size: 14px; border-right: none; border-bottom: 3px solid transparent; }
    .woocommerce-MyAccount-navigation-link.is-active a { border-bottom-color: var(--primary-color); }
    .woocommerce-MyAccount-content .shop_table, .woocommerce-order-details { background: #fff; padding: 15px !important; margin: 15px 0 !important; border-radius: 15px !important; width: 100% !important; display: table !important; border: 1px solid #f0f0f0 !important; }
    .shop_table thead { display: table-header-group; }
    .shop_table th, .shop_table td { padding: 12px 8px !important; font-size: 13px !important; line-height: 1.5; border-bottom: 1px solid #f1f5f9 !important; }
    .woocommerce-table__product-name { width: 65%; font-weight: 600; color: #1e293b; }
    .woocommerce-table__product-total { width: 35%; text-align: left !important; font-weight: 700; color: var(--primary-color); }
    .woocommerce-button.button { display: block; width: 100%; text-align: center; margin-top: 5px; padding: 12px !important; border-radius: 10px; }
}
/* =========================================
   9. Branding & Preloader
   ========================================= */
.site-branding { display: flex; align-items: center; }
.gama-logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.gama-header-logo { width: auto; height: 60px; transition: transform 0.3s ease; }
.gama-logo-link:hover .gama-header-logo { transform: rotate(15deg) scale(1.1); }
.site-branding .site-title { font-size: 1.6rem; font-weight: 900; color: #333; margin: 0; line-height: 1; white-space: nowrap; }

/* Preloader */
#gama-preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-white); z-index: 999999; display: flex; justify-content: center; align-items: center; transition: opacity 0.6s ease, visibility 0.6s ease; }
.gama-preloader-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.gama-energy-logo { width: 100px; height: 100px; overflow: visible; }
.gama-orbit-group { transform-origin: 50px 50px; animation: gama-spin-orbit 2s linear infinite; }
.gama-core-group { transform-origin: 50px 50px; animation: gama-pulse-core 2s ease-in-out infinite; }
.gama-brand-text { font-family: "Arial Black", "Arial Bold", Gadget, sans-serif; font-weight: 900; font-style: italic; font-size: 28px; color: var(--secondary-bg); letter-spacing: 2px; margin-top: 15px; text-transform: uppercase; animation: gama-text-fade 2s ease-in-out infinite alternate; }
@keyframes gama-spin-orbit { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes gama-pulse-core { 0% { transform: scale(0.9); filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0)); opacity: 0.8; } 50% { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(37, 99, 235, 0.6)); opacity: 1; } 100% { transform: scale(0.9); filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0)); opacity: 0.8; } }
@keyframes gama-text-fade { 0% { opacity: 0.7; } 100% { opacity: 1; } }
body.loaded #gama-preloader { opacity: 0; visibility: hidden; }

/* =========================================
   10. Desktop Product Cards & Grid
   ========================================= */
.gama-product-grid { display: grid; grid-template-columns: repeat(var(--gama-cols, 4), 1fr); gap: 20px; margin-bottom: 0px; width: 100%; }
.gama-product-card {
    background: var(--bg-white); box-shadow: 0 0 0 1px #e2e8f0, 0 4px 20px rgba(0,0,0,0.03);
    border-radius: 12px; overflow: hidden; transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    display: flex; flex-direction: column; position: relative; height: 100%; transform: translate3d(0,0,0);
}
.gama-product-card:hover { transform: translateY(-8px); box-shadow: 0 0 0 1px #3b82f6, 0 20px 40px -5px rgba(37, 99, 235, 0.2); z-index: 5; }
.gpc-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.gpc-image { position: relative; padding-top: 100%; overflow: hidden; background: var(--bg-white) !important; margin: 12px 12px 0 12px; border-radius: 20px; -webkit-mask-image: -webkit-radial-gradient(white, black); }
.gpc-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform 0.6s ease; transform: none !important; z-index: auto !important; }
.gama-product-card:hover .gpc-image img { transform: scale(1.08); }

.gpc-details { padding: 18px 15px; flex-grow: 1; display: flex; flex-direction: column; text-align: center; align-items: center; }
.gpc-title { font-size: 0.95rem; font-weight: 800; margin-bottom: 15px; line-height: 1.6; color: var(--secondary-bg); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 46px; transition: color 0.3s; }
.gama-product-card:hover .gpc-title { color: var(--primary-color); }
.gpc-price { margin-top: auto; font-weight: 800; color: var(--primary-color); font-size: 1rem; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 8px; width: 100%; min-height: 28px; }
.gpc-price del { color: #94a3b8; font-size: 0.85rem; text-decoration: line-through; font-weight: normal; }
.gpc-price ins { text-decoration: none; color: #dc2626; font-size: 1.1rem; }
.gpc-action { background: #f1f5f9; color: #64748b; text-align: center; padding: 14px; font-size: 0.9rem; font-weight: 700; margin: 0 12px 12px 12px; border-radius: 16px; transition: all 0.3s ease; border: 1px solid transparent; }
.gama-product-card:hover .gpc-action { background: var(--primary-color); color: var(--bg-white); box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3); }

/* =========================================
   11. Archive & Blog Styles
   ========================================= */
/* Archive Grid & Modernization */
.archive .page-title, .search .page-title { font-size: 2rem; font-weight: 900; color: var(--secondary-bg); margin-bottom: 10px; text-align: center; }
.archive .woocommerce-ordering select { padding: 10px 15px; border: 1px solid #e2e8f0; border-radius: 12px; background-color: var(--bg-white); font-family: var(--font-main); cursor: pointer; outline: none; transition: 0.2s; }
.archive .woocommerce-ordering select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Unified Product Grid Override - FIXED */
.woocommerce ul.products { 
    display: grid !important; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px !important; 
    margin-bottom: 50px !important; 
    padding: 0; 
}

/* اصلاح چیدمان برای موبایل */
@media (max-width: 768px) {
    .woocommerce ul.products { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important; 
    }
}

.woocommerce ul.products li.product {
    float: none !important; width: 100% !important; margin: 0 !important; background: var(--bg-white);
    border: 1px solid #e2e8f0; border-radius: 24px; overflow: hidden; transition: all 0.4s;
    display: flex; flex-direction: column; position: relative; padding: 0 !important; text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); 
    min-height: 380px; /* ارتفاع دسکتاپ */
    visibility: visible !important; opacity: 1 !important; min-width: 0;
}

/* اصلاح ارتفاع و دکمه در موبایل */
@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        min-height: 310px !important; /* ارتفاع مناسب موبایل */
        border-radius: 15px !important;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.85rem !important;
        min-height: 2.8em !important; /* تراز کردن فضای عنوان */
        padding: 0 10px !important;
    }
}

/* فوت کوزه‌گری: تراز کردن قطعی دکمه‌ها در یک خط */
.woocommerce ul.products li.product .button {
    margin-top: auto !important; /* دکمه را به پایین‌ترین نقطه کارت هل می‌دهد */
    margin-bottom: 15px !important;
    width: calc(100% - 20px) !important;
    align-self: center;
}
.woocommerce ul.products li.product:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -5px rgba(37, 99, 235, 0.2); border-color: #3b82f6; z-index: 2; }
.woocommerce ul.products li.product a img { width: calc(100% - 24px) !important; margin: 12px auto 0 !important; height: auto; aspect-ratio: 1/1; object-fit: contain; background: #f8fafc; border-radius: 20px; transition: transform 0.6s ease; display: block; }
.woocommerce ul.products li.product:hover a img { transform: scale(1.08); }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem !important; font-weight: 800 !important; color: var(--secondary-bg) !important;
    padding: 15px 0px 0px !important; margin: 0 !important; line-height: 1.6 !important;
    min-height: 60px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.woocommerce ul.products li.product:hover .woocommerce-loop-product__title { color: var(--primary-color) !important; }
.woocommerce ul.products li.product .price { color: var(--primary-color) !important; font-weight: 800 !important; font-size: 1rem !important; display: flex !important; justify-content: center !important; align-items: center !important; gap: 8px !important; margin-bottom: 15px !important; flex-wrap: nowrap !important; }
.woocommerce ul.products li.product .price del { color: #94a3b8; font-size: 0.85rem; font-weight: normal; text-decoration: line-through; opacity: 0.8; display: inline-block !important; }
.woocommerce ul.products li.product .price ins { text-decoration: none; font-weight: 800; background: transparent !important; }
.woocommerce ul.products li.product .button { margin: 0 15px 15px !important; background: #f1f5f9 !important; color: #64748b !important; padding: 12px !important; border-radius: 14px !important; font-weight: 700 !important; transition: 0.3s !important; display: block !important; margin-top: auto !important; }
.woocommerce ul.products li.product:hover .button { background: var(--primary-color) !important; color: var(--bg-white) !important; box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3); }

/* Out of Stock Styling */
.woocommerce ul.products li.product.outofstock { opacity: 0.8; }
.woocommerce ul.products li.product.outofstock .woocommerce-loop-product__title { color: #94a3b8 !important; }
.woocommerce ul.products li.product.outofstock img { filter: grayscale(100%); }

/* Blog Grid */
.blog-grid, .gama-blog-grid { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 30px !important; width: 100% !important; margin-top: 40px !important; }
.gama-product-grid, .gama-blog-grid { width: 101% !important; } /* Preserved specific width */
.blog-card, .gama-blog-card { width: 100% !important; margin: 0 !important; float: none !important; display: flex; flex-direction: column; background: var(--bg-white); border: 1px solid #f1f5f9; border-radius: 24px; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 5px 20px rgba(0,0,0,0.02); }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); border-color: #cbd5e1; }
.blog-thumbnail, .gb-thumb { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; display: block !important; height: 200px !important; border-radius: 15px !important; margin-bottom: 15px !important; }
.blog-thumbnail img, .gb-thumb img { width: 100% !important; height: 100% !important; object-fit: cover !important; transition: transform 0.5s ease; position: absolute !important; top: 0; left: 0; }
.blog-card:hover .blog-thumbnail img { transform: scale(1.08); }
.blog-date { position: absolute; top: 15px; right: 15px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px); padding: 5px 10px; border-radius: 10px; text-align: center; line-height: 1.2; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 2; }
.blog-date span { display: block; font-size: 1.2rem; font-weight: 800; color: var(--primary-color); }
.blog-content, .gb-content { padding: 25px; flex-grow: 1; display: flex !important; flex-direction: column !important; text-align: right !important; }
.entry-title, .gb-title { font-size: 1.15rem; font-weight: 800; line-height: 1.5; margin: 0 0 15px 0; min-height: 30px !important; }
.entry-title a { color: var(--secondary-bg); text-decoration: none; transition: 0.2s; }
.blog-card:hover .entry-title a { color: var(--primary-color); }
.entry-excerpt { font-size: 0.95rem; color: #64748b; line-height: 1.7; margin-bottom: 20px; flex-grow: 1; }
.read-more-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-color); font-weight: 700; font-size: 0.9rem; margin-top: auto; width: fit-content; }
.read-more-btn:hover svg { transform: translateX(-5px); }

/* =========================================
   9. Single Post Layout (Standard Nested Version)
   ========================================= */

.single-post {
    /* ساختار کلی لایه ها */
    #content, .site-content { 
        display: flex; gap: 30px; direction: rtl; 
    }
    
    #main, .site-main { 
        flex: 1; min-width: 0; width: 100%; 
    }

    /* استایل اصلی مقاله */
    article.post {
        background: #fff; padding: 40px; border-radius: 24px; 
        border: 1px solid #f1f5f9; box-sizing: border-box; overflow: hidden;
        
        .gama-single-title { 
            font-size: 1.8rem; font-weight: 900; line-height: 1.5; 
            text-align: right; margin-bottom: 20px; 
        }

        .gama-meta-pills {
            display: flex; flex-direction: row; flex-wrap: nowrap;
            gap: 20px; margin-bottom: 25px; align-items: center;
            
            .meta-pill {
                display: flex; align-items: center; gap: 8px; white-space: nowrap;
                background: #f8fafc; padding: 6px 14px; border-radius: 50px;
                color: #64748b; font-size: 0.85rem; font-weight: 600;
            }
        }

        .entry-content {
            font-size: 1.1rem; line-height: 2.1; color: #334155; 
            text-align: justify; word-wrap: break-word;
            
            img, iframe { max-width: 100%; height: auto; border-radius: 12px; }
            a { color: var(--primary-color); word-break: break-all; }
        }
    }

    /* بخش مخصوص موبایل */
    @media (max-width: 992px) {
        .site-content.container, .container, .main-container, .gama-blog-layout { 
            width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important; 
        }
        
        #content, .site-content { flex-direction: column !important; }

        article.post {
            padding: 20px 15px !important; border-radius: 0 !important;
            border-left: none !important; border-right: none !important;

            .gama-single-thumbnail { margin: -20px -15px 20px -15px !important; }
            .gama-single-title { font-size: 1.3rem !important; }
            
            .gama-meta-pills { flex-wrap: wrap !important; gap: 10px !important; }
        }
    }
}
/* Pages */
.page .site-main, .page #main { max-width: 1100px !important; margin: 40px auto !important; float: none !important; }
.page .entry-content { padding: 5px !important; text-align: right; }
.page .entry-title, .page .page-title { text-align: center; font-size: 2rem !important; font-weight: 900; color: var(--secondary-bg); margin-bottom: 40px !important; }
.page .entry-content p > img:only-child { display: block; margin: 30px auto; max-width: 100%; }
.page .entry-content img { display: inline-block; vertical-align: middle; margin: 10px; max-width: 100%; height: auto; border-radius: 16px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: transform 0.3s ease; }
.page .entry-content img:hover:not(.gpc-image img) { transform: scale(1.05); z-index: 2; position: relative; cursor: zoom-in; }
.page .wp-caption { display: inline-block; margin: 10px; max-width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); vertical-align: top; }

/* Checkout Clean Up */
.woocommerce-checkout .col2-set { width: 100% !important; float: none !important; display: block !important; }
.woocommerce-checkout .col2-set .col-1, .woocommerce-checkout .col2-set .col-2 { width: 100% !important; max-width: 100% !important; padding: 0 !important; }
.woocommerce-billing-fields__field-wrapper { display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; }
.woocommerce-checkout .form-row-first, .woocommerce-checkout .form-row-last { width: 48% !important; float: right !important; }
.woocommerce-checkout .form-row-wide, .woocommerce-checkout .notes { width: 100% !important; float: none !important; }
#billing_country_field { display: none !important; }
.woocommerce-checkout input.input-text, .woocommerce-checkout select, .woocommerce-checkout textarea { border: 1px solid #ddd !important; border-radius: 8px !important; padding: 10px !important; background: #fdfdfd !important; }

/* Gama Special Header */
.gama-special-header { margin-bottom: 40px; position: relative; text-align: center; direction: ltr; }
.gsh-top-row { display: flex; justify-content: center; align-items: center; margin-bottom: 15px; position: relative; direction: rtl; min-height: 40px; }
.gsh-title { font-size: 26px; font-weight: 800; margin: 0; color: #333; z-index: 1; }
.gsh-link { font-size: 13px; color: #007bff; display: flex; align-items: center; gap: 5px; position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
.gsh-separator { display: flex; align-items: center; justify-content: center; gap: 15px; opacity: 0.8; margin-top: -10px; }
.gsh-line { height: 2px; width: 120px; background: linear-gradient(90deg, transparent, #e0e0e0, transparent); }
.gsh-icon-box { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--bg-white); color: #007bff; border-radius: 50%; border: 1px solid #eef2f7; box-shadow: 0 4px 10px rgba(0,123,255,0.08); position: relative; z-index: 2; }
.gsh-icon-box svg { width: 20px; height: 20px; fill: currentColor; filter: drop-shadow(0 0 2px rgba(0,123,255,0.3)); }

/* Cleanup */
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; content: none !important; }
.woocommerce ul.products > *:not(li.product) { display: none !important; }
.gama-special-section { margin: 0 0 0 0 !important; }
.gama-special-header { margin-bottom: 10px !important; }
.entry-content img:not(.emoji) { max-width: 100% !important; height: auto !important; }
img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; }
.wp-video-shortcode, .mejs-container { width: 100% !important; max-width: 100% !important; }

/* =========================================
   12. Responsive & Mobile (UNIFIED)
   ========================================= */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 992px) {
    .single-post #content, .single-post .site-content { flex-direction: column; }
    .single-post #main, .single-post .site-main { max-width: 100%; width: 100% !important; }
    .single-post #secondary, .single-post #sidebar { width: 100%; position: static; }
}

@media (max-width: 768px) {
    body, html { overflow-x: hidden !important; width: 100% !important; }
    #content.container { padding: 0 !important; width: 100% !important; max-width: 100% !important; overflow-x: hidden !important; }
    
    /* Product Lists & Grid Mobile */
    .woocommerce ul.products, .archive .site-main .products, .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; padding: 0 10px !important; margin-top: 20px !important; width: 100% !important; box-sizing: border-box !important; }
    .woocommerce ul.products li.product { margin-bottom: 0 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-radius: 12px; width: 100% !important; }
    .woocommerce ul.products li.product img { height: 150px; margin-bottom: 10px !important; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 0.85rem; min-height: 40px; margin-bottom: 5px; }

    /* Single Product Mobile */
    body.single-product { background-color: #f0f2f5 !important; }
    body.single-product div.product { display: flex !important; flex-direction: column !important; width: 100% !important; margin: 0 !important; gap: 0 !important; overflow-x: hidden !important; }
    
    /* Gallery Mobile */
    body.single-product div.product > .woocommerce-product-gallery { width: 100% !important; width: 100vw !important; padding: 0 !important; border: none !important; border-radius: 0 0 24px 24px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important; margin-bottom: 15px !important; overflow: hidden; margin-left: -20px !important; margin-right: -20px !important; position: relative; left: 0; right: 0; }
    .woocommerce div.product div.images, .woocommerce-product-gallery { margin-right: 0 !important; margin-left: 0 !important; padding: 0 !important; float: none !important; }
    .woocommerce-product-gallery__wrapper { margin: 0 !important; padding: 0 !important; }
    .woocommerce-product-gallery__image { padding: 0 !important; }
    .woocommerce-product-gallery__image img { width: 100% !important; border-radius: 0; margin: 0 auto !important; }
    .woocommerce-product-gallery img { border-radius: 0 0 24px 24px !important; width: 100% !important; }
    .woocommerce-product-gallery .flex-control-thumbs { margin-top: 10px !important; }

    /* Info Boxes Mobile */
    .gama-extras-wrapper { background: var(--bg-white) !important; margin: 0 15px 15px 15px !important; border-radius: 16px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important; width: auto !important; max-width: 100% !important; box-sizing: border-box !important; padding: 15px; margin-right: 0 !important; margin-left: 0 !important; width: 100% !important; border-radius: 0; }
    body.single-product div.product > .entry-summary { background: var(--bg-white) !important; width: auto !important; margin: 0 1px 1px 1px !important; padding: 5px !important; border-radius: 16px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important; float: none !important; box-sizing: border-box !important; overflow: hidden; padding-right: 15px !important; padding-left: 15px !important; }
    .product_title { font-size: 1.2rem !important; margin-top: 5px; line-height: 1.6 !important; }
    .summary.entry-summary { overflow: hidden; width: 100%; }
    
    .woocommerce-tabs, .related.products { width: auto !important; margin: 0 15px 30px 15px !important; border-radius: 16px !important; background: var(--bg-white) !important; box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important; box-sizing: border-box !important; overflow: hidden; padding: 15px !important; }
    
    .entry-content img, .woocommerce-product-details__short-description img, .woocommerce-Tabs-panel img, .related.products img { max-width: 100% !important; height: auto !important; display: block; }
    .wp-caption { width: 100% !important; max-width: 100% !important; }
    .wp-caption img { width: 100% !important; height: auto !important; }
    .gallery { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
    .gallery-item { width: 48% !important; max-width: 48% !important; margin: 0 !important; }

    /* Related Products Scroller */
    .related.products ul.products { display: flex !important; overflow-x: auto !important; flex-wrap: nowrap !important; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; gap: 15px !important; padding-bottom: 15px !important; grid-template-columns: none !important; padding-left: 15px !important; padding-right: 15px !important; }
    .related.products ul.products li.product { flex: 0 0 40% !important; width: 40% !important; scroll-snap-align: start; margin-bottom: 0 !important; }
    .related.products ul.products::-webkit-scrollbar { display: none; }

    /* Cart & Checkout Mobile */
    .woocommerce-cart-form table.shop_table, .woocommerce-cart-form table.shop_table thead, .woocommerce-cart-form table.shop_table tbody, .woocommerce-cart-form table.shop_table th, .woocommerce-cart-form table.shop_table td, .woocommerce-cart-form table.shop_table tr { display: block; width: 100% !important; box-sizing: border-box !important; }
    .woocommerce-cart-form table.shop_table thead tr { position: absolute; top: -9999px; left: -9999px; }
    .woocommerce-cart-form table.shop_table tr { border: 1px solid #f1f5f9; border-radius: 16px; margin-bottom: 15px; padding: 15px; background: var(--bg-white); box-shadow: 0 4px 10px rgba(0,0,0,0.03); position: relative; }
    .woocommerce-cart-form table.shop_table td { border: none; position: relative; padding: 5px 0; text-align: right; }
    .woocommerce-checkout .col2-set { flex-direction: column; width: 100% !important; }
    .woocommerce-checkout .col-1, .woocommerce-checkout .col-2 { width: 100%; max-width: 100%; flex: 1 1 100%; }

    /* Mobile Menu */
    .main-navigation { position: fixed; top: 0; right: -300px; width: 300px; height: 100vh; background: var(--bg-white); z-index: 10000; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); padding: 0 !important; overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,0.15); display: flex; flex-direction: column; }
    body.mobile-menu-active .main-navigation { right: 0; }
    .mobile-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font-weight: 800; font-size: 1.1rem; color: var(--secondary-bg); }
    .mobile-menu-close { background: none; border: none; font-size: 2rem; color: #64748b; cursor: pointer; line-height: 1; }
    .main-navigation ul { flex-direction: column !important; width: 100% !important; padding: 0 !important; margin: 0 !important; list-style: none !important; }
    .main-navigation ul li { width: 100% !important; display: flex !important; flex-wrap: nowrap !important; align-items: stretch !important; border-bottom: 1px solid #f1f5f9; margin: 0 !important; padding: 0 !important; }
    .main-navigation ul li:last-child { border-bottom: none; }
    .main-navigation ul li a { flex-grow: 1; padding: 10px 20px !important; font-size: 0.95rem !important; font-weight: 500 !important; color: #334155 !important; display: flex !important; align-items: center !important; text-decoration: none !important; border: none !important; }
    .main-navigation ul li a:hover { background-color: #f8fafc; color: var(--primary-color) !important; }
    .submenu-toggle { display: flex !important; align-items: center; justify-content: center; width: 50px; border-right: 1px solid #f1f5f9; cursor: pointer; color: #94a3b8; }
    .mobile-menu-toggle { display: flex; flex-direction: column; justify-content: space-between; width: 30px; height: 20px; background: none; border: none; padding: 0; cursor: pointer; }
    .mobile-menu-toggle span { display: block; width: 100%; height: 3px; background-color: #333; border-radius: 3px; transition: 0.3s; }

    /* Footer & Widgets Mobile */
    .gama-special-wrapper { grid-template-columns: 1fr; }
    .footer-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
    .col-about, .col-links, .col-trust { grid-column: 1 / -1; text-align: center; }
    .col-links { grid-column: span 1; text-align: center; }
    .footer-widget h4.footer-title::after { right: 50%; transform: translateX(50%); }
    .footer-col ul li a, .contact-list li, .social-icons, .trust-logos { justify-content: center; }
    .gama-samantel-grid, .gama-blog-wrapper { grid-template-columns: 1fr !important; gap: 15px !important; }
    .gama-samantel-card { margin-bottom: 10px; }
    .gama-blog-layout { grid-template-columns: 1fr; gap: 20px; }
    .gama-single-title { font-size: 1.6rem; margin-top: 15px; }
    .page .entry-content { padding: 25px; margin-bottom: 20px; }
    
    /* Comments Mobile */
    #respond form { display: block; } 
    .comment-form-author, .comment-form-email { width: 100%; float: none; margin-bottom: 20px; }
    #comments, #reviews { padding: 20px; }
    .comment-body { flex-direction: column; }
    .comment-author .avatar { margin-bottom: 10px; }
    
    /* Account Mobile */
    .woocommerce-account.logged-in .woocommerce { flex-direction: column; gap: 20px; }
    .woocommerce-account:not(.logged-in) .woocommerce { display: block; }
    .woocommerce-MyAccount-navigation { width: 100%; overflow-x: auto; white-space: nowrap; padding: 10px; flex: none; }
    .woocommerce-MyAccount-navigation ul { display: flex; gap: 10px; }
    .woocommerce-MyAccount-navigation-link { margin-bottom: 0; flex-shrink: 0; }
    .woocommerce-MyAccount-navigation-link a { padding: 8px 15px; border: 1px solid #e5e7eb; border-radius: 8px; border-right: 1px solid #e5e7eb; font-size: 0.9rem; }
    .woocommerce-MyAccount-navigation-link.is-active a { background: var(--primary-color); color: var(--bg-white); border-color: var(--primary-color); }
    .woocommerce-orders-table { display: block; }
    .woocommerce-orders-table__row { display: flex; flex-direction: column; margin-bottom: 15px; padding: 15px; border: 1px solid #f1f3f5; border-radius: 12px; }
    .woocommerce-orders-table__cell { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #f1f3f5; text-align: left; }
    .woocommerce-orders-table__cell:last-child { border-bottom: none; }
    .woocommerce-orders-table__cell::before { content: attr(data-title); font-weight: 700; color: #64748b; float: right; }
    .woocommerce-orders-table__header { display: none; }
    .u-columns.col2-set { flex-direction: column; gap: 20px; }
    .u-column1, .u-column2 { width: 100%; padding: 25px; }

    /* Branding Mobile */
    .gama-header-logo { height: 55px; }
    .site-branding .site-title { font-size: 1.3rem; }
    .gama-logo-link { gap: 8px; }
    .gama-energy-logo { width: 80px; height: 80px; }
    .gama-brand-text { font-size: 22px; letter-spacing: 1px; }

    /* Special Product Card Mobile (Single Column Force) */
    .gama-product-grid { grid-template-columns: 1fr !important; gap: 20px !important; padding: 0 10px; display: flex !important; flex-direction: column !important; align-items: center !important; width: 100% !important; }
    .gama-product-card { box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important; border: 1px solid #f1f5f9; width: 120% !important; margin-left: 0% !important; margin-right: 0% !important; margin-bottom: 00px !important; }
    .gpc-title { font-size: 1rem !important; height: auto !important; margin-bottom: 12px; }
    .gpc-image { margin: 15px 15px 0 15px; }
    
    /* Blog Mobile */
    .blog-grid, .gama-blog-grid, .gama-blog-wrapper { grid-template-columns: 1fr !important; display: flex !important; flex-direction: column !important; gap: 30px !important; width: 100% !important; padding: 0 15px !important; }
    .blog-card, .gama-blog-card { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; margin-bottom: 0 !important; }
    .gb-thumb { height: 220px !important; }

    /* Special Header Mobile */
    .gama-special-header { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; }
    .gsh-title { white-space: nowrap !important; font-size: 20px; }
    .gsh-line { display: none !important; width: 60px; }
    .gsh-link { position: relative; left: auto; top: auto; transform: none; margin-top: 5px; justify-content: center; }
    .gsh-top-row { flex-direction: column; margin-bottom: 10px; }
    
    .gama-extra-buttons { display: flex; justify-content: space-between; gap: 8px; margin-top: 15px; }
    .geb-btn { flex: 1; justify-content: center; }
}
    /* FIX: Prevent Media Overflow in Mobile */
    .entry-content img, .entry-content iframe, .entry-content video, .entry-content .wp-video, .entry-content .wp-caption,
    .woocommerce-product-details__short-description img, .woocommerce-Tabs-panel img {
        max-width: 100% !important; height: auto !important; width: auto !important; box-sizing: border-box !important;
    }
    .gallery { display: flex !important; flex-wrap: wrap !important; gap: 5px !important; justify-content: center !important; }
    .gallery-item { width: 48% !important; max-width: 48% !important; margin: 0 !important; }
    img.emoji {
        width: 1em !important;
        height: 1em !important;
        display: inline !important;
    }
}

/* =========================================
   13. WooCommerce Cart (Final Full-Width RTL)
   ========================================= */

/* --- Desktop Logic --- */
.woocommerce-cart .shop_table.cart { border-radius: 20px; border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.05); background: #fff; border-collapse: separate; border-spacing: 0; width: 100%; overflow: hidden; }
.woocommerce-cart .shop_table.cart thead th { background: #f8fafc; padding: 20px; font-weight: 700; color: #475569; border-bottom: 2px solid #f1f5f9; text-align: right; }
.woocommerce-cart .cart_item td { padding: 20px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; text-align: right; }
.woocommerce-cart .product-thumbnail img { width: 80px !important; border-radius: 12px; }

/* --- Mobile Logic (Wide & Pure RTL) --- */
@media (max-width: 768px) {
    /* حذف فضای خالی چپ و راست برای بزرگتر شدن سبد خرید */
    .woocommerce-cart .site-content .container, 
    .woocommerce-cart .entry-content,
    .woocommerce-cart .woocommerce { padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }
    
    .woocommerce-cart-form { padding: 8px !important; }

    .shop_table_responsive tr { 
        display: grid !important;
        grid-template-columns: 1fr;
        background: #fff; 
        border-radius: 24px; 
        margin-bottom: 20px; 
        padding: 0 !important; 
        border: 1px solid #f0f0f0; 
        box-shadow: 0 8px 25px rgba(0,0,0,0.04); 
        position: relative;
        overflow: hidden;
        width: 100%;
    }

    /* فیکس عکس: بدون کادر، بدون کراپ */
    .shop_table_responsive td.product-thumbnail { 
        display: block !important;
        width: 100% !important;
        height: 240px !important;
        background: #fdfdfd !important;
        padding: 0 !important;
        border: none !important;
        border-bottom: 1px solid #f5f5f5 !important;
    }
    .shop_table_responsive td.product-thumbnail img { 
        width: 100% !important; 
        height: 100% !important; 
        object-fit: contain !important; 
        padding: 15px;
    }

    /* تیتر محصول: اجبار به راست‌چین کامل */
    .shop_table_responsive td.product-name { 
        display: block !important; 
        padding: 20px 20px 5px !important; 
        text-align: right !important; /* حل مشکل چپ‌چین بودن */
        direction: rtl !important;
    }
    .shop_table_responsive td.product-name a { font-weight: 800; font-size: 17px; color: #1e293b; line-height: 1.6; display: block; text-align: right; }
    .shop_table_responsive td.product-name::before { display: none !important; }

    /* ویژگی‌های محصول متغیر (Variations): راست‌چین و منظم */
    .shop_table_responsive td.product-name dl.variation { 
        margin: 12px 0 !important; 
        padding: 12px !important; 
        background: #f8fafc; 
        border-radius: 12px; 
        display: flex;
        flex-direction: column;
        gap: 6px;
        text-align: right !important;
        direction: rtl !important;
    }
    .shop_table_responsive td.product-name dl.variation dt { font-size: 12px !important; color: #94a3b8; font-weight: 700; float: right; margin-left: 5px; }
    .shop_table_responsive td.product-name dl.variation dd { font-size: 12px !important; color: #475569; margin: 0; text-align: right; }
    .shop_table_responsive td.product-name dl.variation p { margin: 0 !important; display: inline; }

    /* بخش‌های مالی: راست‌چین با لیبل‌های خاکستری */
    .shop_table_responsive td.product-price, 
    .shop_table_responsive td.product-quantity, 
    .shop_table_responsive td.product-subtotal { 
        display: flex !important; 
        flex-direction: row-reverse; /* لیبل راست، مقدار چپ */
        justify-content: space-between; 
        align-items: center; 
        padding: 15px 20px !important; 
        border-top: 1px solid #f5f5f5 !important; 
    }
    .shop_table_responsive td::before { 
        content: attr(data-title) ": "; 
        font-weight: 700; 
        color: #94a3b8; 
        font-size: 13px; 
    }

    /* دکمه حذف */
    .shop_table_responsive td.product-remove { position: absolute; top: 12px; left: 12px; z-index: 10; }
    .shop_table_responsive td.product-remove a { 
        background: #fff; 
        color: #ef4444 !important; 
        width: 34px; height: 34px; 
        display: flex; align-items: center; justify-content: center; 
        border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    /* کوپن عریض و مدرن */
    .woocommerce-cart .coupon { 
        display: flex !important; 
        background: #fff; 
        border-radius: 18px; 
        border: 2px solid #f1f5f9; 
        padding: 8px;
        margin: 10px 0 20px 0;
    }
    .woocommerce-cart .coupon input#coupon_code { border: none !important; flex-grow: 1; text-align: right; padding: 0 10px !important; font-size: 14px; }
}