/**
 * استایل‌های اصلی قالب GigiShops
 *
 * @package GigiShops
 */

/* ===== RTL Styles ===== */
html[dir="rtl"] body {
    text-align: right;
}

/* ===== Typography ===== */
body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9333ea, #ec4899);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* ===== Links ===== */
a {
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ===== Line Clamp ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Product Card Hover ===== */
.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-card .product-image {
    transition: transform 0.3s ease;
}

/* ===== FAQ Accordion ===== */
.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* ===== Button Styles ===== */
.btn-primary {
    background: linear-gradient(to right, #9333ea, #ec4899);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(147, 51, 234, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

/* ===== Form Styles ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    font-family: 'Vazirmatn', sans-serif;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #9333ea;
}

/* ===== Mobile Menu ===== */
#mobile-menu-overlay {
    transition: opacity 0.3s ease;
}

#mobile-menu-panel {
    transition: transform 0.3s ease;
}

#mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

#mobile-menu-overlay.active #mobile-menu-panel {
    transform: translateX(0);
}

/* ===== WooCommerce Styles ===== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.woocommerce-message {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.woocommerce-info {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.woocommerce-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* ===== WooCommerce Buttons (Primary) ===== */
.woocommerce .button:not(.checkout-button):not(#place_order),
.woocommerce button.button:not(.checkout-button):not(#place_order),
.woocommerce input.button:not(.checkout-button):not(#place_order),
.woocommerce a.button:not(.checkout-button):not(#place_order),
.woocommerce #respond input#submit,
.woocommerce .cart .button,
.single_add_to_cart_button {
    background: var(--color-primary, #9333ea) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.woocommerce .button:not(.checkout-button):not(#place_order):hover,
.woocommerce button.button:not(.checkout-button):not(#place_order):hover,
.woocommerce input.button:not(.checkout-button):not(#place_order):hover,
.woocommerce a.button:not(.checkout-button):not(#place_order):hover,
.single_add_to_cart_button:hover {
    filter: brightness(1.1) !important;
    box-shadow: 0 10px 15px -3px rgba(147, 51, 234, 0.3), 0 4px 6px -2px rgba(147, 51, 234, 0.1) !important;
    transform: translateY(-2px) !important;
}

.woocommerce .button:not(.checkout-button):not(#place_order):active,
.single_add_to_cart_button:active {
    transform: translateY(0) !important;
}

/* دکمه‌های checkout و place_order از استایل‌های عمومی جدا می‌شوند و استایل خاص خود را دارند */

/* ===== Add to Cart Form Layout ===== */
.woocommerce form.cart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Wrapper برای quantity و button */
.woocommerce form.cart .gigishops-add-to-cart-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

/* در موبایل: quantity و button کنار هم با عرض یکسان */
@media (max-width: 640px) {
    .woocommerce form.cart .gigishops-add-to-cart-wrapper {
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .woocommerce form.cart .gigishops-add-to-cart-wrapper .quantity,
    .woocommerce form.cart .gigishops-add-to-cart-wrapper .gigishops-quantity {
        flex: 0 0 auto;
        width: auto;
        max-width: 120px;
        min-width: 100px;
    }
    
    .woocommerce form.cart .gigishops-add-to-cart-wrapper .single_add_to_cart_button {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }
    
    .woocommerce form.cart .gigishops-quantity {
        width: auto;
        max-width: 120px;
        flex-shrink: 0;
    }
    
    .woocommerce form.cart .gigishops-qty-input {
        width: 3rem;
        min-width: 3rem;
        flex-shrink: 0;
    }
    
    .woocommerce form.cart .quantity label {
        display: none;
    }
}

/* Alt button (secondary) */
.woocommerce .button.alt,
.woocommerce a.button.alt {
    background: linear-gradient(135deg, var(--color-primary, #9333ea) 0%, var(--color-secondary, #ec4899) 100%) !important;
}

/* Disabled state */
.woocommerce .button:disabled,
.woocommerce .button.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* WooCommerce Blocks - دکمه‌های checkout و place_order */
.wc-block-cart__submit-button,
.wc-block-cart__submit-container a,
.wc-block-cart__submit-container .wc-block-components-button,
.wc-block-components-checkout-place-order-button,
button.wc-block-components-checkout-place-order-button {
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
    background-image: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
    background-color: transparent !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 1rem 2rem !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    width: 100% !important;
    text-align: center !important;
    box-shadow: 0 4px 14px 0 rgba(147, 51, 234, 0.39) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 3.5rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-container a:hover,
.wc-block-cart__submit-container .wc-block-components-button:hover,
.wc-block-components-checkout-place-order-button:hover,
button.wc-block-components-checkout-place-order-button:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%) !important;
    background-image: linear-gradient(135deg, #7c3aed 0%, #db2777 100%) !important;
    box-shadow: 0 8px 25px 0 rgba(147, 51, 234, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
    color: white !important;
}

.wc-block-components-button__text {
    color: white !important;
}

/* Checkout button specific - دکمه رفتن به صفحه پرداخت (کلاسیک WooCommerce) */
.woocommerce .wc-proceed-to-checkout {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button,
.woocommerce .wc-proceed-to-checkout .checkout-button,
.woocommerce .cart-collaterals .checkout-button,
.woocommerce .cart-collaterals a.checkout-button,
.woocommerce .cart-collaterals .wc-proceed-to-checkout a.checkout-button,
.woocommerce .cart-collaterals .wc-proceed-to-checkout .checkout-button,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
body.woocommerce-cart .cart-collaterals .checkout-button,
body.woocommerce-cart .cart-collaterals a.checkout-button {
    width: 100% !important;
    text-align: center !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    padding: 1rem 2rem !important;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
    background-image: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 14px 0 rgba(147, 51, 234, 0.39) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
    min-height: 3.5rem !important;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button::before,
.woocommerce .wc-proceed-to-checkout .checkout-button::before,
.woocommerce .cart-collaterals .checkout-button::before,
.woocommerce .cart-collaterals a.checkout-button::before,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::before,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button::before,
body.woocommerce-cart .cart-collaterals .checkout-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover::before,
.woocommerce .wc-proceed-to-checkout .checkout-button:hover::before,
.woocommerce .cart-collaterals .checkout-button:hover::before,
.woocommerce .cart-collaterals a.checkout-button:hover::before,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover::before,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover::before,
body.woocommerce-cart .cart-collaterals .checkout-button:hover::before {
    left: 100%;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce .wc-proceed-to-checkout .checkout-button:hover,
.woocommerce .cart-collaterals .checkout-button:hover,
.woocommerce .cart-collaterals a.checkout-button:hover,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover,
body.woocommerce-cart .cart-collaterals .checkout-button:hover,
body.woocommerce-cart .cart-collaterals a.checkout-button:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%) !important;
    background-image: linear-gradient(135deg, #7c3aed 0%, #db2777 100%) !important;
    box-shadow: 0 8px 25px 0 rgba(147, 51, 234, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
    filter: brightness(1.05) !important;
    color: white !important;
    text-decoration: none !important;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:active,
.woocommerce .wc-proceed-to-checkout .checkout-button:active,
.woocommerce .cart-collaterals .checkout-button:active,
.woocommerce .cart-collaterals a.checkout-button:active,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:active,
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:active,
body.woocommerce-cart .cart-collaterals .checkout-button:active {
    transform: translateY(-1px) scale(1) !important;
    box-shadow: 0 4px 12px 0 rgba(147, 51, 234, 0.4) !important;
}

/* Place order button - دکمه ثبت سفارش */
.woocommerce #place_order,
.woocommerce button#place_order,
.woocommerce input#place_order,
body.woocommerce-checkout #place_order,
body.woocommerce-checkout button#place_order,
body.woocommerce-checkout input#place_order,
.woocommerce-checkout #place_order,
.woocommerce-checkout button#place_order,
.woocommerce-checkout input#place_order {
    width: 100% !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    padding: 1rem 2rem !important;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
    background-image: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 4px 14px 0 rgba(147, 51, 234, 0.39) !important;
    position: relative !important;
    overflow: hidden !important;
    margin-top: 1.5rem;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    min-height: 3.5rem !important;
}

.woocommerce #place_order::before,
.woocommerce button#place_order::before,
.woocommerce input#place_order::before,
body.woocommerce-checkout #place_order::before,
body.woocommerce-checkout button#place_order::before,
body.woocommerce-checkout input#place_order::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.woocommerce #place_order:hover::before,
.woocommerce button#place_order:hover::before,
.woocommerce input#place_order:hover::before,
body.woocommerce-checkout #place_order:hover::before,
body.woocommerce-checkout button#place_order:hover::before,
body.woocommerce-checkout input#place_order:hover::before {
    left: 100%;
}

.woocommerce #place_order:hover,
.woocommerce button#place_order:hover,
.woocommerce input#place_order:hover,
body.woocommerce-checkout #place_order:hover,
body.woocommerce-checkout button#place_order:hover,
body.woocommerce-checkout input#place_order:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%) !important;
    background-image: linear-gradient(135deg, #7c3aed 0%, #db2777 100%) !important;
    box-shadow: 0 8px 25px 0 rgba(147, 51, 234, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
    filter: brightness(1.05) !important;
    color: white !important;
}

.woocommerce #place_order:active,
.woocommerce button#place_order:active,
.woocommerce input#place_order:active,
body.woocommerce-checkout #place_order:active,
body.woocommerce-checkout button#place_order:active,
body.woocommerce-checkout input#place_order:active {
    transform: translateY(-1px) scale(1) !important;
    box-shadow: 0 4px 12px 0 rgba(147, 51, 234, 0.4) !important;
}

.woocommerce #place_order:disabled,
.woocommerce button#place_order:disabled,
.woocommerce input#place_order:disabled,
body.woocommerce-checkout #place_order:disabled,
body.woocommerce-checkout button#place_order:disabled,
body.woocommerce-checkout input#place_order:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    filter: none !important;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
    background-image: linear-gradient(135deg, #9333ea 0%, #ec4899 100%) !important;
}

/* Continue shopping / view cart links */
.woocommerce .woocommerce-message a.button.wc-forward {
    background: transparent !important;
    color: var(--color-primary, #9333ea) !important;
    border: 2px solid var(--color-primary, #9333ea) !important;
    box-shadow: none !important;
}

.woocommerce .woocommerce-message a.button.wc-forward:hover {
    background: var(--color-primary, #9333ea) !important;
    color: white !important;
}

/* ===== Sale Badge ===== */
.onsale {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(to right, #ef4444, #f97316);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Out of Stock ===== */
.out-of-stock {
    opacity: 0.6;
}

.out-of-stock::after {
    content: 'ناموجود';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* ===== Price Styles ===== */
del {
    color: #9ca3af;
    text-decoration: line-through;
}

ins {
    text-decoration: none;
    color: #059669;
    font-weight: 600;
}

/* ===== WooCommerce Product Grid (Responsive) ===== */
/* در موبایل: 2 ستون */
/* Override کردن کلاس columns-4 از WooCommerce */
.woocommerce ul.products,
.woocommerce ul.products.columns-4,
.woocommerce ul.products.columns-3,
.woocommerce ul.products.columns-2 {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

/* در تبلت کوچک (640px به بالا): 2 ستون */
@media (min-width: 640px) {
    .woocommerce ul.products,
    .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-3,
    .woocommerce ul.products.columns-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }
}

/* در تبلت (768px به بالا): 3 ستون */
@media (min-width: 768px) {
    .woocommerce ul.products,
    .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-3,
    .woocommerce ul.products.columns-2 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

/* در دسکتاپ (1024px به بالا): 4 ستون */
@media (min-width: 1024px) {
    .woocommerce ul.products,
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

.woocommerce ul.products li.product {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: block !important;
    clear: both !important;
}

/* Override کردن استایل‌های WooCommerce برای columns */
.woocommerce ul.products.columns-4 li.product,
.woocommerce ul.products.columns-3 li.product,
.woocommerce ul.products.columns-2 li.product {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    clear: both !important;
}

/* اطمینان از اینکه محصولات در صفحه جستجو هم درست نمایش داده می‌شوند */
/* Override کردن کلاس columns-4 از WooCommerce */
/* در موبایل: 2 ستون (زیر 768px) */
.search-results .woocommerce ul.products,
body.search .woocommerce ul.products,
body.search-results .woocommerce ul.products,
body.search .woocommerce ul.products.columns-4,
body.search-results .woocommerce ul.products.columns-4,
.woocommerce ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
    float: none !important;
}

/* در تبلت کوچک (640px به بالا): 2 ستون */
@media (min-width: 640px) {
    .search-results .woocommerce ul.products,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products,
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }
}

/* در تبلت (768px به بالا): 3 ستون */
@media (min-width: 768px) {
    .search-results .woocommerce ul.products,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products,
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

/* در دسکتاپ (1024px به بالا): 4 ستون */
@media (min-width: 1024px) {
    .search-results .woocommerce ul.products,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products,
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

/* ===== Loading Spinner ===== */
.gigishops-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== GigiShops Primary Button (uses CSS variable) ===== */
.gigishops-btn-primary {
    background: var(--color-primary, #9333ea);
    color: white;
    cursor: pointer;
    border: none;
}

.gigishops-btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gigishops-btn-primary:active {
    transform: scale(0.98);
}

/* Gradient variant */
.gigishops-btn-primary-gradient {
    background: linear-gradient(135deg, var(--color-primary, #9333ea) 0%, var(--color-secondary, #ec4899) 100%);
    color: white;
    cursor: pointer;
    border: none;
}

.gigishops-btn-primary-gradient:hover {
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.35);
}

/* Outline variant */
.gigishops-btn-outline {
    background: transparent;
    color: var(--color-primary, #9333ea);
    border: 2px solid var(--color-primary, #9333ea);
    cursor: pointer;
}

.gigishops-btn-outline:hover {
    background: var(--color-primary, #9333ea);
    color: white;
}

/* ===== Product Card Base Styles ===== */
.product-card {
    display: flex;
    flex-direction: column;
}

.product-card a {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Modern Card */
.product-card--modern {
    border: none;
}

.product-card--modern:hover {
    transform: translateY(-4px);
}

/* Minimal Card */
.product-card--minimal {
    box-shadow: none;
}

/* Classic Card */
.product-card--classic {
    border: 1px solid #f3f4f6;
}

/* ===== Add to Cart Button Animation ===== */
.add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-to-cart-btn.loading span {
    visibility: hidden;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.add-to-cart-btn.added {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
}

.add-to-cart-btn.added i::before {
    content: '\f00c'; /* fa-check */
}

/* ===== Product Tabs ===== */
.gigishops-product-tabs {
    margin-top: 2rem;
}

.gigishops-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gigishops-tab-btn {
    white-space: nowrap;
    min-width: 120px;
}

.gigishops-tab-btn:focus {
    outline: none;
}

/* Tab Content Styling */
.gigishops-tab-panel .prose {
    font-size: 1rem;
    line-height: 1.8;
}

.gigishops-tab-panel .prose h2,
.gigishops-tab-panel .prose h3,
.gigishops-tab-panel .prose h4 {
    color: #1f2937;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.gigishops-tab-panel .prose p {
    margin-bottom: 1rem;
}

.gigishops-tab-panel .prose ul,
.gigishops-tab-panel .prose ol {
    margin-right: 1.25rem;
    margin-bottom: 1rem;
}

.gigishops-tab-panel .prose li {
    margin-bottom: 0.5rem;
}

/* Additional Information Table */
.gigishops-additional-info table {
    width: 100%;
    border-collapse: collapse;
}

.gigishops-additional-info table tr {
    border-bottom: 1px solid #e5e7eb;
}

.gigishops-additional-info table tr:last-child {
    border-bottom: none;
}

.gigishops-additional-info table th,
.gigishops-additional-info table td {
    padding: 1rem;
    text-align: right;
}

.gigishops-additional-info table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    width: 40%;
}

.gigishops-additional-info table td {
    color: #6b7280;
}

/* Reviews Section */
.gigishops-reviews .woocommerce-Reviews-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.gigishops-reviews .commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gigishops-reviews .comment {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
}

.gigishops-reviews .comment .comment_container {
    display: flex;
    gap: 1rem;
}

.gigishops-reviews .comment .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gigishops-reviews .comment .comment-text {
    flex: 1;
}

.gigishops-reviews .comment .meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.gigishops-reviews .comment .woocommerce-review__author {
    font-weight: 600;
    color: #1f2937;
}

.gigishops-reviews .comment .woocommerce-review__published-date {
    color: #9ca3af;
    font-size: 0.875rem;
}

.gigishops-reviews .star-rating {
    display: inline-flex;
    color: #fbbf24;
    font-size: 0.875rem;
}

.gigishops-reviews .comment .description p {
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

/* Review Form */
.gigishops-reviews #review_form_wrapper {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.gigishops-reviews .comment-reply-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.gigishops-reviews .comment-form label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.gigishops-reviews .comment-form input[type="text"],
.gigishops-reviews .comment-form input[type="email"],
.gigishops-reviews .comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gigishops-reviews .comment-form input:focus,
.gigishops-reviews .comment-form textarea:focus {
    border-color: var(--color-primary, #9333ea);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
    outline: none;
}

.gigishops-reviews .comment-form .stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.gigishops-reviews .comment-form .stars a {
    color: #d1d5db;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.gigishops-reviews .comment-form .stars a:hover,
.gigishops-reviews .comment-form .stars a.active {
    color: #fbbf24;
}

/* ===== Product Gallery Lightbox ===== */
#gigishops-lightbox {
    animation: fadeIn 0.3s ease;
}

#gigishops-lightbox.hidden {
    display: none !important;
}

#gigishops-lightbox #lightbox-image {
    animation: zoomIn 0.3s ease;
}

#gigishops-lightbox #lightbox-close,
#gigishops-lightbox #lightbox-prev,
#gigishops-lightbox #lightbox-next {
    transition: all 0.2s ease;
    cursor: pointer;
}

#gigishops-lightbox #lightbox-close:hover,
#gigishops-lightbox #lightbox-prev:hover,
#gigishops-lightbox #lightbox-next:hover {
    transform: scale(1.1);
}

#gigishops-lightbox #lightbox-counter {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

#main-image-container {
    cursor: zoom-in;
}

#main-image-container:hover {
    opacity: 0.95;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== Product Gallery Navigation Buttons ===== */
#prev-image,
#next-image {
    opacity: 0.7;
}

#prev-image:hover,
#next-image:hover {
    opacity: 1;
}

#product-gallery:hover #prev-image,
#product-gallery:hover #next-image {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    /* اطمینان از 2 ستون در موبایل برای صفحه جستجو */
    /* Override کردن کلاس columns-4 از WooCommerce */
    .search-results .woocommerce ul.products,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products,
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    .woocommerce ul.products,
    .woocommerce ul.products.columns-4,
    .woocommerce ul.products.columns-3,
    .woocommerce ul.products.columns-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
        display: grid !important;
        float: none !important;
    }
    
    /* اطمینان از اینکه هر محصول عرض کامل ندارد */
    .woocommerce ul.products li.product,
    .woocommerce ul.products.columns-4 li.product,
    .woocommerce ul.products.columns-3 li.product,
    .woocommerce ul.products.columns-2 li.product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        clear: both !important;
    }
}

/* استایل اضافی برای اطمینان از override شدن استایل‌های WooCommerce در موبایل */
@media screen and (max-width: 767px) {
    /* Override کامل برای صفحه جستجو در موبایل */
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    .search-results .woocommerce ul.products.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        -ms-grid-columns: 1fr 0.75rem 1fr !important;
        display: -ms-grid !important;
        display: grid !important;
        gap: 0.75rem !important;
        column-gap: 0.75rem !important;
        row-gap: 0.75rem !important;
    }
    
    /* اطمینان از اینکه محصولات در grid قرار می‌گیرند */
    body.search .woocommerce ul.products.columns-4 li.product,
    body.search-results .woocommerce ul.products.columns-4 li.product {
        -ms-grid-column: auto !important;
        -ms-grid-row: auto !important;
        grid-column: auto !important;
        grid-row: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        clear: both !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #gigishops-lightbox #lightbox-prev,
    #gigishops-lightbox #lightbox-next {
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    
    #gigishops-lightbox #lightbox-close {
        top: 1rem;
        left: 1rem;
        font-size: 1.5rem;
    }
    
    /* دکمه‌های checkout و place order در موبایل */
    .woocommerce .wc-proceed-to-checkout a.checkout-button,
    .woocommerce .wc-proceed-to-checkout .checkout-button,
    .woocommerce .cart-collaterals .checkout-button,
    .woocommerce .cart-collaterals a.checkout-button,
    body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
    body.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
    body.woocommerce-cart .cart-collaterals .checkout-button,
    .woocommerce #place_order,
    .woocommerce button#place_order,
    .woocommerce input#place_order,
    body.woocommerce-checkout #place_order,
    body.woocommerce-checkout button#place_order,
    body.woocommerce-checkout input#place_order {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 3rem !important;
    }
}

/* ===== استایل اضافی برای صفحه جستجو در موبایل - با اولویت بالا ===== */
/* این استایل‌ها باید در انتهای فایل باشند تا اولویت بالاتری داشته باشند */
/* استایل قوی برای موبایل - 2 ستون */
@media screen and (max-width: 767px) {
    /* Override کامل برای صفحه جستجو - 2 ستون در موبایل */
    ul.products.columns-4,
    .woocommerce ul.products.columns-4,
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products,
    .search-results .woocommerce ul.products.columns-4,
    .search-results .woocommerce ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        -ms-grid-columns: 1fr 0.75rem 1fr !important;
        gap: 0.75rem !important;
        column-gap: 0.75rem !important;
        row-gap: 0.75rem !important;
        width: 100% !important;
        float: none !important;
        clear: both !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        box-sizing: border-box !important;
    }
    
    ul.products.columns-4 li.product,
    ul.products.columns-4 li,
    .woocommerce ul.products.columns-4 li.product,
    body.search .woocommerce ul.products.columns-4 li.product,
    body.search-results .woocommerce ul.products.columns-4 li.product,
    body.search .woocommerce ul.products li.product,
    body.search-results .woocommerce ul.products li.product,
    .search-results .woocommerce ul.products.columns-4 li.product,
    .search-results .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
        clear: both !important;
        display: block !important;
        -ms-grid-column: auto !important;
        -ms-grid-row: auto !important;
        grid-column: auto !important;
        grid-row: auto !important;
        box-sizing: border-box !important;
    }
}

/* در تبلت کوچک (640px تا 767px): 2 ستون */
@media screen and (min-width: 640px) and (max-width: 767px) {
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

/* در تبلت (768px به بالا): 3 ستون */
@media screen and (min-width: 768px) {
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* در دسکتاپ (1024px به بالا): 4 ستون */
@media screen and (min-width: 1024px) {
    body.search .woocommerce ul.products.columns-4,
    body.search-results .woocommerce ul.products.columns-4,
    body.search .woocommerce ul.products,
    body.search-results .woocommerce ul.products {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
    }
}



