:root {
    --primary: #138585;
    --primary-dark: #138585;
    --primary-light: #e7f3f3;
    --footer-bg: #138585;
    --form-bg: #fdfdfd;
    --input-icon-bg: #f2f9f9;
    --secondary: #2c3e50;
    --accent: #e52e2e;
    --white: #ffffff;
    --bg-light: #f9f9f9;
    --border: #eeeeee;
    --text-main: #333333;
    --text-muted: #777777;
    --black: #000000;
    --radius: 8px;
}

/* Base resets - No Transitions/Animations as requested */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none !important;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--white);
    color: var(--text-main);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Remove All Interactive Effects */
button,
a,
.action-icon-v2,
.product-card-v3,
.cat-icon-v3,
.service-item-v3,
img {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    box-shadow: none !important;
}

button:hover,
a:hover,
img:hover {
    transform: none !important;
}

/* ==========================================================================
   ACCESSIBILITY (WCAG 2.1 Compliance)
   ========================================================================== */

/* Screen Reader Only - Hidden but Accessible */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Skip Link - Shows on Focus */
.skip-link {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    left: 50%;
    padding: 12px 24px;
    position: fixed;
    top: -100px;
    transform: translateX(-50%);
    z-index: 100000;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* Focus States for Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
}

/* Focus within for interactive cards */
.product-card-v3:focus-within,
.cat-item-v3:focus-within,
.service-item-v3:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Button Focus */
.btn-v2:focus-visible,
.btn-teal:focus-visible,
.btn-view-more:focus-visible {
    outline: 3px solid var(--secondary) !important;
    outline-offset: 2px !important;
}

/* Input Focus Override */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
}

/* Reduced Motion - Respects User Preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Top Bar */
.top-bar-v2 {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 700;
    width: 100%;
}

/* Header & Navbar - PURE FLEX */
.site-header-v2 {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Icons on the LEFT - Logo on the RIGHT */
.header-actions-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    order: 1;
}

.logo-wrapper-v2 {
    flex-shrink: 0;
    order: 3;
}

.nav-menu-v2 {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    order: 2;
}

/* Action Icons Styling - Rigid */
.action-icon-v2 {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.action-icon-v2 svg {
    width: 22px;
    height: 22px;
}

.cart-count-v2 {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* Menu items */
.main-nav-ul-v2 {
    display: flex;
    gap: 20px;
    list-style: none;
}

.main-nav-ul-v2 a {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
}

/* Drawers - Instant Fix */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 110000;
    visibility: hidden;
    opacity: 0;
}

.drawer-overlay.active {
    visibility: visible;
    opacity: 1;
}

.drawer {
    position: fixed;
    top: 0;
    width: 380px;
    max-width: 90%;
    height: 100%;
    background: white;
    z-index: 110001;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

.drawer-left {
    left: -110%;
}

.drawer-right {
    right: -110%;
}

#menu-drawer {
    display: none !important;
}

@media (max-width: 768px) {
    #menu-drawer {
        display: flex !important;
    }
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .nav-menu-v2 {
        display: none;
    }

    .header-actions-v2 {
        gap: 8px;
    }

    .action-icon-v2 {
        width: 38px;
        height: 38px;
    }

    /* Logo on Right - Actions on Left */
    .navbar-v2 {
        position: relative;
        justify-content: space-between;
    }

    .logo-wrapper-v2 {
        position: static;
        transform: none;
        left: auto;
        top: auto;
        padding: 0;
        width: auto;
    }

    .drawer {
        width: 100%;
        max-width: 100%;
    }
}

/* Fluid Bannner Shadow */
.home-title-banner div,
.shop-title-banner div {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* "Fluid" Shadow */
}

/* Sections Spacing */
.py-8 {
    padding-top: 30px;
    padding-bottom: 30px;
}

.home-slider {
    margin-bottom: 20px;
}

/* Product Cards Grid - Robust Responsive */
.products-grid-v3 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .products-grid-v3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid-v3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 5px;
        /* Side spacing */
    }
}

/* Product Card Styling */
.product-card-v3 {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1px;
    /* Exactly 1px padding */
    background: white;
    text-align: center;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Soft Shadow (Fluid effect) */
}

.product-img-v3 {
    display: block;
    margin-bottom: 10px;
    border-radius: 7px 7px 0 0;
    /* Matches card radius at top */
    width: 100%;
}

.product-img-v3 img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.product-title-v3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
    height: 2.8em;
    overflow: hidden;
    padding: 0 5px;
    /* Add internal padding for text */
}

.product-price-v3 {
    margin-bottom: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.price-regular-v3 {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    /* Standard line-through */
    text-decoration-color: #e52e2e;
    /* Red Color */
    text-decoration-thickness: 1.5px;
    /* Visible thickness */
}

.price-sale-v3 {
    color: var(--black);
}

/* Utilities */
.btn-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-teal {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-grey {
    background: #f1f3f5;
    color: var(--secondary);
    width: 100%;
}

/* Loader Animation */
.loader-spinner {
    width: 25px;
    height: 25px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite !important;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Refactored Styles (From Inline)
   ========================================= */

/* Services Section */
.home-services {
    padding-bottom: 60px;
    margin-bottom: 0;
}

.home-services-v3 {
    padding-bottom: 40px;
}

.services-grid-v3 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-item-v3 {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-icon-wrapper-v3 {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.inner-circle-v3 {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-item-v3 h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 5px;
}

.service-item-v3 p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .services-grid-v3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .service-icon-wrapper-v3 {
        width: 60px;
        height: 60px;
    }

    .inner-circle-v3 {
        width: 45px;
        height: 45px;
    }

    .service-item-v3 h3 {
        font-size: 0.85rem;
    }

    .service-item-v3 p {
        font-size: 0.8rem;
    }
}

/* Categories Circle */
.cat-section-header-v3 {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title-v3 {
    font-size: var(--cat-title-size);
    font-weight: 800;
    color: var(--secondary);
    margin: 0;
}

.view-all-link-v3 {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    gap: 5px;
}

.cat-grid-v3 {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.cat-item-v3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: var(--cat-icon-size-d);
    text-align: center;
    flex-shrink: 0;
}

.cat-circle-img {
    width: var(--cat-icon-size-d);
    height: var(--cat-icon-size-d);
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f9f9f9;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
}

.cat-item-v3:hover .cat-circle-img {
    transform: none;
    box-shadow: none;
}

.cat-circle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-name-v3 {
    font-size: var(--cat-name-size);
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .cat-section-header-v3 {
        display: flex;
    }

    .cat-grid-v3 {
        gap: 15px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        padding-right: 5px;
        padding-left: 5px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .cat-grid-v3::-webkit-scrollbar {
        display: none;
    }

    .cat-item-v3 {
        width: var(--cat-icon-size-m);
        scroll-snap-align: start;
        gap: 6px;
        pointer-events: auto;
    }

    .cat-circle-img {
        width: var(--cat-icon-size-m);
        height: var(--cat-icon-size-m);
    }

    .cat-name-v3 {
        font-size: 11px !important;
    }
}

/* Footer Styles */
.footer-grid-revamped {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.footer-col-brand {
    text-align: right;
    padding-left: 20px;
}

.footer-logo-text {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.footer-desc-text {
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 320px;
}

.footer-nav-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li a {
    display: block;
    padding: 6px 0;
    font-size: 0.95rem;
    opacity: 0.9;
    transition: 0.3s;
}

.footer-links-list li a:hover {
    padding-right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding-left: 8px;
}

.social-icons-modern {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-item {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
}

.social-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.social-item.fb {
    background-color: #1877F2;
}

.social-item.insta {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-item.tiktok {
    background-color: #000000;
}

.social-item.whatsapp {
    background-color: #25D366;
}

.footer-bottom-new {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .footer-grid-revamped {
        grid-template-columns: 1fr;
        gap: 0;
        display: block;
    }

    .footer-col-brand {
        text-align: center;
        padding-left: 0;
        padding-bottom: 30px;
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-icons-modern {
        justify-content: center;
    }

    .footer-desc-text {
        text-align: center;
        margin: 0 auto 20px;
    }

    .footer-col-nav {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-nav-title {
        margin: 0;
        padding: 15px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .footer-nav-title::after {
        content: '+';
        font-size: 1.2rem;
        transition: 0.3s;
    }

    .footer-col-nav.active .footer-nav-title::after {
        content: '-';
        transform: rotate(180deg);
    }

    .footer-links-list {
        max-height: 0;
        overflow: hidden;
        transition: 0.4s ease;
    }

    .footer-col-nav.active .footer-links-list {
        max-height: 300px;
        padding-bottom: 15px;
    }

    .footer-col-nav.active .footer-links-list li a:first-child {
        margin-top: 10px;
    }
}

/* Archive Override */
@media (max-width: 1024px) {
    .products-grid-v3 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 768px) {
    .products-grid-v3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 5px !important;
    }
}

/* =========================================
   Step 3: Refined Product Card Styling
   ========================================= */

/* Discount Badge */
.discount-badge-v3 {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #e52e2e;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Reduced Spacing and Spacing Layout */
.product-info-v3 {
    padding-bottom: 5px;
    /* Bottom spacing */
}

.product-title-v3 {
    margin-bottom: 2px !important;
    /* Reduced title-price gap */
    height: 2.6em;
    /* Slightly tighter height check */
}

.product-price-v3 {
    margin-bottom: 12px;
}

/* Red & Thin Regular Price */
.price-regular-v3 {
    font-size: 0.85rem;
    color: #e52e2e !important;
    /* Full Red */
    font-weight: 300 !important;
    /* Thin Font */
    text-decoration: line-through;
    text-decoration-color: #e52e2e;
    text-decoration-thickness: 1px;
    position: relative;
    top: 1px;
    /* Optical alignment */
}

/* Button Container Spacing - No Fluid */
.product-actions-v3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px 10px;
    /* Sides and Bottom Spacing */
    width: 100%;
}

.product-actions-v3 .btn-v2 {
    width: 100%;
    /* Fill container (which has padding) */
    font-size: 0.85rem;
    border-radius: 4px;
    padding: 8px 0;
}

@media (max-width: 768px) {
    .product-actions-v3 {
        padding: 0 5px 8px;
        /* Slightly less on mobile */
    }

    .discount-badge-v3 {
        font-size: 0.7rem;
        padding: 1px 5px;
    }

    .product-title-v3 {
        font-size: 0.8rem;
    }
}

/* Cart Count Badge - Rounded with Color */
.cart-count-v2 {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    /* Uses theme Accent (usually red/orange) */
    color: white;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    /* Border to separate from icon */
}

/* Cart Item Removal - Button Style */
.remove-cart-item-ajax {
    background: #fff0f0;
    color: #ff5c5c;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    left: 10px;
    border: 1px solid #ffebeb;
    cursor: pointer;
    transition: 0.2s;
}

.remove-cart-item-ajax:hover {
    background: #ff5c5c;
    color: white;
    transform: rotate(90deg);
}

/* Flying Image Animation */
.fly-img-anim {
    position: fixed;
    z-index: 120000;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Modern Drawer Close Button */
.drawer-close-modern {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 100;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--secondary);
    /* Strict No-Animation Policy */
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.drawer-close-modern:hover {
    background: #f5f5f5;
    /* Subtle flat background on hover only */
    color: var(--black);
    transform: none !important;
    box-shadow: none !important;
}

.drawer-close-modern svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Mobile Menu Clean List */
.mobile-menu-list-clean {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mobile-menu-list-clean li {
    border-bottom: 1px solid #f7f7f7;
}

.mobile-menu-list-clean li a {
    display: block;
    padding: 16px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    transition: 0.2s;
}

.mobile-menu-list-clean li a:hover {
    padding-right: 8px;
    /* Slight nudge on hover */
    color: var(--primary);
}

/* Category Circle Border Refinement */
.cat-item-v3 .cat-circle-img {
    border: 1px solid var(--border) !important;
    /* Outer 1px Border */
    padding: 1px !important;
    /* 1px Gap/Empty Space */
    /* Image inside will be full size minus padding */
    background: white;
    /* Optional: gap color */
}

.cat-item-v3 .cat-circle-img img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Ensure content is round */
}

/* Footer Social Icons - White bg, Primary color */
.social-icons-modern .social-item {
    background: white !important;
    color: var(--primary) !important;
    border: none !important;
}

.social-icons-modern .social-item:hover {
    background: #f0f0f0 !important;
    /* Slightly darker white on hover */
    transform: translateY(-3px);
}

/* Product Grid Full Width & Tight Spacing */
.product-grid-section-v3 {
    padding-top: 10px;
    padding-bottom: 20px;
    width: 100%;
}

.products-grid-v3 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Extremely tight gap on desktop as requested */
    gap: 10px;
}

@media (max-width: 1024px) {
    .products-grid-v3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .products-grid-v3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        /* Minimal gap on mobile */
    }
}

/* Force Object Fit for Product Images */
.product-img-v3 img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    display: block;
}

/* Page Content Typography */
.text-content-v3 {
    max-width: 900px;
    /* Reading optimial width */
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
}

.text-content-v3 p {
    margin-bottom: 20px;
}

.text-content-v3 h1,
.text-content-v3 h2,
.text-content-v3 h3,
.text-content-v3 h4 {
    color: var(--secondary);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 800;
}

.text-content-v3 ul,
.text-content-v3 ol {
    margin-bottom: 20px;
    padding-right: 20px;
    /* RTL List padding */
}

.text-content-v3 li {
    margin-bottom: 10px;
}

/* Sticky Product Gallery - Desktop Only */
@media (max-width: 900px) {
    .product-single-wrapper {
        align-items: stretch !important;
        /* Reset sticky alignment on mobile */
    }

    .product-gallery {
        position: static !important;
        /* Remove sticky on mobile */
    }
}

/* --- Saudi COD Form Styles --- */
.cod-saudi-form-wrapper {
    background: var(--form-bg);
    border: 2px solid #8e8eeb;
    /* Light Purple Border */
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    font-family: 'Cairo', sans-serif;
}

.cod-form-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--secondary);
}

/* Offer Cards */
.cod-offers-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.cod-offer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.2s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.cod-offer-card:hover {
    border-color: #8e8eeb;
}

.cod-offer-card.selected {
    border: 2px solid #8e8eeb;
    background: #f4f4ff;
    box-shadow: 0 4px 10px rgba(142, 142, 235, 0.15);
}

.cod-offer-card input[type="radio"] {
    display: none;
    /* Hide default radio */
}

.offer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.offer-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.offer-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--secondary);
}

.offer-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-top: 5px;
}

.offer-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 15px;
    /* RTL fix needs testing, usually margin-left for RTL */
    margin-left: 0;
}

[dir="rtl"] .offer-img {
    margin-right: 0;
    margin-left: 15px;
}

.offer-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Variations */
.cod-variations-wrap {
    margin-bottom: 25px;
}

.cod-variation-row {
    margin-bottom: 15px;
}

.var-label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.var-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.var-option-item {
    cursor: pointer;
    position: relative;
}

.var-option-item input {
    display: none;
}

/* Text Swatch (Size) */
.swatch-text {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-weight: 600;
    transition: 0.2s;
}

.var-option-item input:checked+.swatch-text {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Color Swatch */
.swatch-color {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #ddd;
    transition: 0.2s;
}

.var-option-item input:checked+.swatch-color {
    box-shadow: 0 0 0 2px var(--secondary);
    transform: scale(1.1);
}

/* Inputs */
.cod-inputs-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

/* --- Unified COD Input Styles (Responsive & No Overlap) --- */
.cod-input-wrap {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

.cod-input-wrap input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px 12px 75px !important;
    /* LTR Default */
    border: 1px solid #eeeeee !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    font-family: 'Cairo', sans-serif !important;
    transition: all 0.3s ease !important;
    background: #ffffff !important;
    color: #333 !important;
    height: 52px !important;
    min-height: 52px !important;
}

[dir="rtl"] .cod-input-wrap input {
    padding: 12px 75px 12px 15px !important;
    /* RTL Spacing */
    text-align: right !important;
}

.cod-input-wrap input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(19, 133, 133, 0.08) !important;
    background: #fff !important;
    outline: none !important;
}

.cod-input-wrap .input-icon {
    position: absolute !important;
    top: 50% !important;
    left: 8px !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    background: var(--input-icon-bg) !important;
    border-radius: 11px !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

[dir="rtl"] .cod-input-wrap .input-icon {
    left: auto !important;
    right: 8px !important;
}

.cod-input-wrap .input-icon svg {
    width: 20px !important;
    height: 20px !important;
}

/* Summary */
.cod-order-summary {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.summary-row.total {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-bottom: 0;
    font-weight: 800;
    font-size: 1.2rem;
}

.summary-row .value.success {
    color: #27ae60;
    font-weight: 700;
}

/* Button */
.cod-submit-btn {
    width: 100%;
    background: #8e8eeb;
    /* Match Theme/Image */
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(142, 142, 235, 0.4);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.cod-submit-btn:hover {
    background: #7676d6;
    transform: translateY(-2px);
}

/* --- Updated Saudi COD Form Styles (User Refinements) --- */

.cod-saudi-form-wrapper {
    background: rgba(19, 133, 133, 0.03);
    /* Transparent Brand Color Background */
    border: 2px solid var(--primary);
    /* Brand Color Border */
    border-radius: var(--radius);
    /* Theme Radius */
    padding: 15px;
    /* Reduced Padding */
}

.cod-form-title {
    color: var(--primary);
}

/* Compact Offer Cards */
.cod-offers-grid {
    gap: 10px;
    /* Reduced Gap */
}

.cod-offer-card {
    padding: 8px 10px;
    /* Compact Padding */
    border-radius: var(--radius);
    flex-direction: row-reverse;
    /* Image Right, Text Left */
    border: 1px solid #e0e0e0;
}

.cod-offer-card.selected {
    border: 2px solid var(--primary);
    background: rgba(19, 133, 133, 0.08);
    /* Light Brand Bg */
    box-shadow: none;
}

.offer-content {
    flex-direction: row-reverse;
    /* Content inside card also flipped */
    justify-content: flex-start;
    gap: 12px;
}

.offer-img {
    margin: 0 !important;
    /* Reset margins */
    width: 50px;
    /* Smaller Image */
    height: 50px;
    flex-shrink: 0;
}

.offer-text {
    text-align: right;
    /* Text aligned correctly */
    line-height: 1.2;
}

.offer-title {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.offer-price-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.95rem;
}

.offer-compare-price {
    color: #e52e2e;
    text-decoration: line-through;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Compact Inputs */
.cod-inputs-group {
    gap: 10px;
    /* Reduced Gap */
    margin-bottom: 15px;
}

/* Inputs are now handled by unified global styles above */

/* Button & Summary */
.cod-submit-btn {
    background: var(--primary);
    /* Brand Color */
    border-radius: var(--radius);
    /* Match Fields */
    font-size: 1.1rem;
    padding: 14px;
}

.cod-submit-btn:hover {
    background: var(--primary-dark);
}

.cod-submit-btn span.price-in-btn {
    display: none;
    /* Hide Price in Button as requested */
}

/* Summary Translation Fix via CSS Content? No, safer to edit HTML */

/* --- FINAL REFINEMENTS FOR SAUDI COD FORM --- */

/* 1. Global Form Font & Colors */
.cod-saudi-form-wrapper,
.cod-saudi-form-wrapper input,
.cod-saudi-form-wrapper button,
.cod-saudi-form-wrapper .cod-offer-card {
    font-family: inherit !important;
    /* Forces 'Cairo' from body */
}

/* 2. Inputs Styling */
/* Standardized across all forms */

/* 3. Offer Layout: [Image] [Title] .... [Price] */
.cod-offers-grid .cod-offer-card {
    border-radius: var(--radius);
    padding: 10px;
    align-items: center;
    /* Ensure default flex direction (ROW) for RTL means: Start=Right, End=Left */
    flex-direction: row !important;
}

.cod-offers-grid .offer-content {
    display: flex;
    align-items: center;
    width: 100%;
    flex-direction: row !important;
    /* Ensure Image is First (Right in RTL) */
}

/* Image on Right */
.cod-offers-grid .offer-img {
    width: 50px;
    height: 50px;
    margin-left: 12px !important;
    /* Space between Image and Title */
    margin-right: 0 !important;
}

/* Text Container */
.cod-offers-grid .offer-text {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Title Right, Price Left */
    flex-direction: row !important;
    width: 100%;
}

/* Title on Right */
.cod-offers-grid .offer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
}

/* Prices on Left */
.cod-offers-grid .offer-price-wrap {
    display: flex;
    flex-direction: column;
    /* Stack Price & Compare Price vertically or horizontally? User said "Small comparison price", maybe stack is better for space? Let's keep horizontal for now as per previous, but align LEFT */
    align-items: flex-end;
    /* Align to Left (End in RTL means Left) */
    text-align: left;
    gap: 2px;
}

.cod-offers-grid .offer-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
}

.cod-offers-grid .offer-compare-price {
    font-size: 0.8rem;
    color: #e52e2e;
    text-decoration: line-through;
    font-weight: 400;
}

/* Remove Blue Hover on Offers */
.cod-offers-grid .cod-offer-card:hover {
    border-color: var(--primary) !important;
    background: transparent !important;
    /* Optional: very subtle bg if needed, or none as requested */
}

.cod-offers-grid .cod-offer-card.selected:hover {
    background: rgba(19, 133, 133, 0.08) !important;
    /* Keep selected bg */
}

/* --- IMPROVED RESPONSIVE VARIATIONS INSIDE OFFERS --- */

/* Wrapper */
.cod-offer-variations {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    width: 100%;
    text-align: right;
    /* RTL */
}

/* Row (Label + Options) */
.cod-variation-row-inline {
    display: flex;
    flex-direction: column;
    /* Stack label on top of options */
    align-items: flex-start;
    /* Align Right in RTL */
    margin-bottom: 12px;
    width: 100%;
}

.var-inline-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
    display: inline-block;
}

/* Options Container */
.var-options-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
    /* Start from Right in RTL context */
}

/* Option Item (Common) */
.var-option-small {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    margin: 0;
}

/* Color Swatch Styling */
.swatch-color-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-left: 6px;
    /* Space between circle and text */
}

.swatch-name-text {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

/* Text Swatch Styling (Size, etc.) */
.swatch-text-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Matches input radius */
    min-width: 35px;
    text-align: center;
    font-weight: 500;
}

/* Hover & Selected States (Handled by JS mostly, but basic CSS here) */
.var-option-small:hover .swatch-text-small {
    border-color: var(--primary);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .cod-offer-variations {
        margin-top: 10px;
        padding-top: 10px;
    }

    .var-options-inline {
        gap: 8px;
    }

    .swatch-text-small {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

/* --- BUNDLE STYLE VARIATIONS --- */

.cod-offer-variations.bundle-style {
    margin-top: 20px !important;
    padding-top: 10px;
    width: 100%;
    /* Reset text align for grid */
    text-align: right;
}

/* Header Row */
.cod-bundle-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 5px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #000;
}

.bundle-head-label {
    flex: 1;
    /* Equal Width Columns */
    text-align: center;
}

.bundle-head-spacer {
    width: 30px;
    /* Space for #num */
}

/* Item Row */
.cod-bundle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

/* Select Wrapper */
.cod-bundle-select-wrap {
    flex: 1;
    position: relative;
}

.cod-bundle-select {
    width: 100%;
    appearance: none;
    /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Subtle shadow per image */
}

.cod-bundle-select:focus {
    border-color: #000;
    outline: none;
}

/* Custom Arrow */
.custom-arrow {
    position: absolute;
    left: 10px;
    /* Left for RTL */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #333;
}

/* IF LTR, change left to right. Assuming RTL body. */
[dir="rtl"] .custom-arrow {
    left: 10px;
    right: auto;
}

[dir="ltr"] .custom-arrow {
    right: 10px;
    left: auto;
}

/* Item Number #1, #2 */
.cod-item-num {
    width: 30px;
    font-weight: 800;
    font-size: 1rem;
    color: #000;
    text-align: center;
}

/* Mobile Tweak */
@media (max-width: 480px) {
    .cod-bundle-header {
        font-size: 0.8rem;
    }

    .cod-bundle-select {
        font-size: 0.85rem;
        padding: 6px 8px;
    }

    .cod-bundle-row {
        gap: 6px;
    }
}

/* --- STRICT IMAGE MATCHING REFINEMENTS --- */

/* 1. Card Layout Adjustment (Price Left, Info Right) */
.cod-offers-grid .cod-offer-card {
    justify-content: space-between !important;
    padding: 12px !important;
    border: 2px solid #e0e0e0;
    /* Match thicker border in image */
}

.cod-offers-grid .cod-offer-card.selected {
    border-color: var(--primary) !important;
    /* Blue border selected */
    background: #f0f8ff;
    /* Light blue bg match */
}

/* Hide Radio Input (Image doesn't show it visible) */
.cod-offers-grid .cod-offer-card input[type="radio"] {
    display: none;
}

/* Content Area */
.cod-offers-grid .offer-content {
    width: 100%;
    justify-content: space-between;
}

/* Image & Title Group (Right Side) */
.cod-offers-grid .offer-text {
    flex-direction: row-reverse !important;
    /* Put Title Left of Image, but globally Right side */
    justify-content: flex-start;
    gap: 10px;
}

/* Image */
.cod-offers-grid .offer-img {
    width: 45px !important;
    height: 45px !important;
    border-radius: 6px;
    margin: 0 !important;
    order: 2;
    /* Image Last (Rightmost) */
}

/* Title */
.cod-offers-grid .offer-title {
    text-align: right;
    font-size: 1rem !important;
    color: #000 !important;
    order: 1;
    /* Title before Image */
    margin-right: 0 !important;
}

/* Price (Left Side) */
.cod-offers-grid .offer-price-wrap {
    position: absolute;
    left: 15px;
    top: 15px;
    /* Fixed position top left like image */
    text-align: left;
    display: flex;
    flex-direction: column;
}

.cod-offers-grid .offer-price {
    font-size: 1.1rem !important;
    color: #000 !important;
    font-weight: 900 !important;
}

.cod-offers-grid .offer-compare-price {
    font-size: 0.85rem !important;
    color: #e52e2e !important;
    margin-top: -2px;
}

/* Make sure card has padding for absolute price */
.cod-offers-grid .cod-offer-card {
    position: relative;
    min-height: 80px;
    /* Ensure height for price */
}


/* 2. Bundle Grid Alignment (Perfect Columns) */
.cod-offer-variations.bundle-style {
    margin-top: 50px !important;
    /* Push down to clear price/title */
}

.cod-bundle-header {
    padding: 0 45px 0 0;
    /* Right padding to avoid #num, match columns */
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Equal cols */
    gap: 10px;
    text-align: center;
}

.bundle-head-label {
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.bundle-head-spacer {
    display: none;
}

/* Managed via grid */

.cod-bundle-row {
    display: grid;
    grid-template-columns: 1fr 1fr 30px;
    /* Select, Select, #Num */
    gap: 10px;
    align-items: center;
}

/* Number #1 */
.cod-item-num {
    text-align: left;
    /* Align # to left of selects */
    font-weight: 900;
    font-size: 1.1rem;
}

/* Selects */
.cod-bundle-select {
    height: 42px;
    /* Taller inputs */
    text-align: center;
    text-align-last: center;
    /* Center text inside select */
    font-size: 1rem;
    font-weight: 700;
}

/* Hide Radio again just to be safe globally */
input[name="cod_qty_offer"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Mobile Responsive Fixes */
@media (max-width: 480px) {
    .cod-bundle-select {
        height: 38px;
        font-size: 0.9rem;
        padding: 0 5px;
    }

    .cod-offers-grid .offer-price {
        font-size: 1rem !important;
    }

    .cod-offers-grid .offer-title {
        font-size: 0.9rem !important;
        max-width: 140px;
        /* Prevent title overlap price */
    }
}

/* --- BUNDLE LAYOUT FIX (RTL #1 Right) --- */

.cod-bundle-header {
    /* 3 Col Grid: Spacer (Right), Label, Label */
    grid-template-columns: 30px 1fr 1fr !important;
    padding: 0 !important;
}

.bundle-head-label {
    text-align: center;
}

.bundle-head-spacer {
    display: block !important;
    /* Visible spacer for #num col */
    width: auto;
}

.cod-bundle-row {
    /* 3 Col Grid: #Num (Right), Select, Select */
    grid-template-columns: 30px 1fr 1fr !important;
}

.cod-item-num {
    text-align: center !important;
    /* Center the # number in its column */
    font-size: 1.1rem;
    padding-top: 2px;
}

/* Ensure Selects are tall and clean */
.cod-bundle-select {
    height: 44px !important;
    line-height: 1.5;
}

/* Mobile Tweak: Ensure enough width */
@media (max-width: 360px) {
    .cod-bundle-row {
        grid-template-columns: 25px 1fr 1fr !important;
    }

    .cod-bundle-header {
        grid-template-columns: 25px 1fr 1fr !important;
    }
}

/* --- NEW OFFER CARD HEADER STYLES --- */

/* Reset Flex on Card */
.cod-offers-grid .cod-offer-card {
    display: flex !important;
    flex-direction: column !important;
    /* Stack Header then Body */
    padding: 15px !important;
    align-items: stretch !important;
}

/* Header Row */
.cod-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    /* Order: Info(Right), Price(Left) using row-reverse relative to HTML [Price, Info] */
    /* No wait, in RTL: Start=Right. So HTML [Info, Price] means Info Right. */
    /* But HTML is [Price, Info]. So RTL displays [Price(Right) ... Info(Left)]. */
    /* We want Info Right, Price Left. So we need to Swap. */
    flex-direction: row-reverse;
}

/* Price Column (Left side visually) */
.cod-card-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align text to Left (End in RTL) */
    text-align: left;
    min-width: 80px;
}

.cod-card-price-col .offer-price {
    font-size: 1.2rem;
    font-weight: 900;
    color: #000;
    line-height: 1.1;
}

.cod-card-price-col .offer-compare-price {
    font-size: 0.9rem;
    color: #e52e2e;
    text-decoration: line-through;
    opacity: 0.8;
}

/* Info Column (Right side visually) */
.cod-card-info-col {
    display: flex;
    align-items: center;
    /* Center image vertical */
    gap: 12px;
    flex-grow: 1;
    justify-content: flex-start;
    /* Start from Right (RTL) */
}

/* Image */
.offer-img-wrap img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

/* Text */
.offer-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align Right (Start in RTL) */
    text-align: right;
}

.offer-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #000;
    line-height: 1.3;
    margin-bottom: 4px;
}

.badge-popular {
    background: #444;
    /* Dark badge as per image */
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Ensure Bundle container clears everything */
.cod-offer-variations.bundle-style {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: none !important;
    /* No dash line in this design, just space */
}

/* Mobile Adjustments */
@media (max-width: 400px) {
    .offer-img-wrap img {
        width: 40px;
        height: 40px;
    }

    .offer-title {
        font-size: 0.95rem;
    }

    .cod-card-price-col .offer-price {
        font-size: 1.1rem;
    }
}

/* --- Refine Right Alignment for Header --- */

/* Ensure Info Col (Right) is packed tight to the right */
.cod-card-info-col {
    justify-content: flex-start !important;
    /* Start = Right in RTL */
    gap: 12px;
}

/* Ensure Text Wrap aligns strictly right */
.offer-text-wrap {
    align-items: flex-start !important;
    /* Cross axis start = Right in RTL */
    text-align: right !important;
}

/* Image no margin */
.offer-img-wrap {
    margin: 0 !important;
    flex-shrink: 0;
}

/* Ensure Default Selection Styling */
.cod-bundle-select option[selected] {
    font-weight: bold;
}

/* --- FINAL UI REFINEMENTS (Badge Red & Compact Inputs) --- */

/* 1. Badge Popular: Red & Smaller */
.badge-popular {
    background: #e52e2e !important;
    /* Red Color */
    font-size: 0.65rem !important;
    /* Smaller text */
    padding: 1px 5px !important;
    /* Reduce padding */
    line-height: 1.2;
    border-radius: 3px;
    margin-top: 3px;
    font-weight: normal;
}

/* 2. Compact Select Inputs & Labels */

/* Bundle Headers (Size/Color) */
.cod-bundle-header {
    margin-bottom: 4px !important;
}

.bundle-head-label {
    font-size: 0.8rem !important;
    /* Smaller label text */
    font-weight: 700;
}

/* Select Inputs */
.cod-bundle-select {
    height: 34px !important;
    /* Reduced height */
    padding: 0 5px 0 5px !important;
    /* Reduced padding */
    font-size: 0.85rem !important;
    /* Smaller text inside select */
    line-height: 1.2 !important;
    border-radius: 4px !important;
}

/* Row Spacing */
.cod-bundle-row {
    gap: 6px !important;
    /* Tighter gap */
    margin-bottom: 6px !important;
}

/* Item Number */
.cod-item-num {
    font-size: 0.9rem !important;
    /* Slightly smaller number */
}

/* Ensure Arrow matches size */
.custom-arrow {
    transform: translateY(-50%) scale(0.8);
    /* Smaller arrow */
}

/* --- STANDARD VARIATIONS (No Bundle) --- */

.cod-std-variations-wrap {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: right;
    /* RTL */
}

.cod-std-var-row {
    margin-bottom: 15px;
}

.cod-std-var-row:last-child {
    margin-bottom: 0;
}

.std-var-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
}

.std-var-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.std-var-option {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Hide Radio */
.std-var-option input[type="radio"] {
    display: none;
}

/* Color Swatches */
.std-swatch-color {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.std-swatch-name {
    margin-right: 8px;
    /* RTL */
    font-size: 0.9rem;
    color: #555;
}

/* Selected Color State */
.std-var-option input:checked+.std-swatch-color {
    border-color: #333;
    transform: scale(1.1);
}

.std-var-option input:checked~.std-swatch-name {
    font-weight: 700;
    color: #000;
}

/* Text Buttons (Sizes) */
.std-swatch-text {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.2s ease;
}

/* Selected Text State */
.std-var-option input:checked+.std-swatch-text {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- DRAWER ACTIVE STATES (Required for JS Toggle) --- */
.drawer.active {
    /* Base active logic */
    visibility: visible;
}

.drawer-left.active {
    left: 0 !important;
}

.drawer-right.active {
    right: 0 !important;
}

/* Ensure overlay is above everything but below drawer */
/* REMOVED by request to fix stacking context issues. 
   Relies on template-specific z-indexes (8888/8889) and correct JS targeting. */
/* 
.drawer-overlay.active {
    visibility: visible;
    opacity: 1;
    z-index: 9998;
}
.drawer {
    z-index: 9999;
}
*/

/* Animation Fixes */
.fly-img-clone {
    position: fixed !important;
    /* Fixed is better than absolute for scrolling */
    pointer-events: none;
    z-index: 100000;
}

/* --- UX/UI: Hide 'View Cart' and Style Loading --- */
a.added_to_cart,
a.added_to_cart.wc-forward {
    display: none !important;
    /* Hide English text */
}

/* Loading Spinner */
.btn-v2 {
    transition: all 0.3s ease;
}

.btn-v2.loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}

.btn-v2.loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}

@keyframes btnSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Fly Wrapper Styles (if wrapper used) */
.fly-item-wrapper {
    position: fixed;
    z-index: 100000;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    /* Crop image to circle */
    background: #fff;
}

.fly-item-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fly-item-qty {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    z-index: 2;
}

/* --- Professional Fly Animation Styles --- */
.fly-item-wrapper {
    /* Brand Border */
    border: 3px solid var(--primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Optimistic Removal Animation */
.cart-item-v3.removing {
    opacity: 0.5;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

/* --- Pro Removal UX: Blur & Loading --- */
.cart-item-v3 {
    position: relative;
    transition: all 0.3s ease;
}

.cart-item-v3.deleting::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(3px);
    z-index: 5;
    border-radius: 12px;
}

.cart-item-v3.deleting::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 6;
}

/* --- Pro Fly Animation: Cart Icon Style --- */
.fly-badge-only {
    position: fixed;
    z-index: 100005;
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.fly-badge-only svg {
    width: 14px;
    height: 14px;
}

/* --- Product Card Mobile Optimizations --- */
@media (max-width: 768px) {
    .product-title-v3 {
        font-size: 0.85rem !important;
        line-height: 1.3;
        margin-bottom: 4px !important;
    }

    .product-title-v3 a {
        font-size: 0.85rem !important;
    }

    .product-price-v3 {
        margin-top: 2px !important;
    }

    .product-info-v3 {
        padding: 8px 10px !important;
        gap: 4px !important;
    }

    .price-sale-v3 {
        font-size: 0.95rem !important;
    }

    .price-regular-v3 {
        font-size: 0.75rem !important;
    }
}

/* --- Product Card Desktop Spacing --- */
@media (min-width: 769px) {
    .product-title-v3 {
        margin-bottom: 5px;
    }

    .product-info-v3 {
        padding: 12px 14px;
        gap: 5px;
    }

    .product-price-v3 {
        margin-top: 3px;
    }
}

/* --- Mobile Title Visual Truncation --- */
@media (max-width: 768px) {
    .product-title-v3 a {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* --- Product Card Desktop Title Refinements --- */
@media (min-width: 769px) {
    .product-title-v3 {
        font-size: 0.9rem;
        line-height: 1.4;
        min-height: 2.8em;
        /* Space for 2 lines if needed */
        margin-bottom: 8px;
    }

    .product-title-v3 a {
        font-size: 0.9rem;
        font-weight: 700;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* --- Hide Page Title on Thank You Page --- */
.hide-page-title .entry-title,
.hide-page-title .page-title,
.hide-page-title article>header,
.hide-page-title .entry-header {
    display: none !important;
}

/* --- COD Submit Button Loading States --- */
.cod-submit-btn.loading {
    pointer-events: none;
    opacity: 0.9;
    background: var(--primary);
}

.cod-submit-btn.success {
    background: #28a745 !important;
    pointer-events: none;
}

.cod-submit-btn .btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

.cod-submit-btn .btn-check {
    display: inline-block;
    font-size: 1.1em;
    margin-left: 8px;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Spinner Only (Centered) --- */
.cod-submit-btn.loading .btn-spinner {
    margin: 0 auto;
    display: block;
}

/* ==========================================================================
   WOOCOMMERCE PAGINATION (Modern Separated Boxes Style)
   ========================================================================== */
.woocommerce-pagination {
    margin: 40px 0;
    text-align: center;
    display: flex;
    justify-content: center;
}

.woocommerce-pagination ul.page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    border: none;
    background: transparent;
}

.woocommerce-pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
    border: none;
}

.woocommerce-pagination ul.page-numbers li .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    background: #fff;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.woocommerce-pagination ul.page-numbers li span.current {
    background: #f0f0f0;
    color: #1a1a1a;
    border-color: #e5e5e5;
}

/* Hover State */
.woocommerce-pagination ul.page-numbers li a:hover {
    background: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
    transform: none !important;
    box-shadow: none !important;
}

.woocommerce-pagination ul.page-numbers li span.current:hover {
    background: #f0f0f0 !important;
}

/* Next/Prev Arrows */
.woocommerce-pagination .next,
.woocommerce-pagination .prev {
    font-size: 1.2rem;
    font-weight: 800;
}

/* Dots Style */
.woocommerce-pagination ul.page-numbers li .dots {
    background: transparent;
    border: none;
    color: #666;
    min-width: 40px;
}

/* ===== PAGINATION V2 (Shop Shortcode) ===== */
.pagination-v2 nav.woocommerce-pagination {
    display: flex;
    justify-content: center;
}

.pagination-v2 .page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    gap: 8px;
    border: none !important;
    background: transparent !important;
}

.pagination-v2 .page-numbers li {
    margin: 0;
    padding: 0;
    border: none !important;
}

.pagination-v2 .page-numbers li a,
.pagination-v2 .page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    background: #fff;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.pagination-v2 .page-numbers li span.current {
    background: #f0f0f0;
    color: #1a1a1a;
    border-color: #e5e5e5;
}

.pagination-v2 .page-numbers li a:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .woocommerce-pagination ul.page-numbers,
    .pagination-v2 .page-numbers {
        gap: 6px;
    }

    .woocommerce-pagination ul.page-numbers li .page-numbers,
    .pagination-v2 .page-numbers li a,
    .pagination-v2 .page-numbers li span {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
}

/* --- Lander & COD Form Final Fixes --- */
.codleade-lander-mode .lander-container {
    direction: rtl;
}

[dir="rtl"] .cod-input-wrap input {
    text-align: right !important;
}

/* Ensure phone number starts from right and placeholder is right-aligned */
[dir="rtl"] .cod-input-wrap input[type="tel"] {
    text-align: right !important;
}

/* User fix: Restore form borders and shadows on Lander */
.codleade-lander-mode .cod-saudi-form-wrapper {
    background: #fff !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    margin: 20px auto !important;
    padding: 20px !important;
}

/* --- LANDER SPECIFIC RTL OVERRIDES --- */
.codleade-lander-mode .cod-input-wrap .input-icon {
    left: auto !important;
    right: 8px !important;
}

.codleade-lander-mode .cod-input-wrap input {
    padding-right: 75px !important;
    padding-left: 15px !important;
    text-align: right !important;
    direction: rtl !important;
}

/* Fix for phone field specifically */
.codleade-lander-mode .cod-input-wrap input[type="tel"] {
    text-align: right !important;
    direction: rtl !important;
}

/* Ensure the title and other elements follow RTL */
.codleade-lander-mode .cod-form-title {
    text-align: center !important;
}

/* ==========================================================================
   SHOP PAGE CUSTOM TEMPLATE STYLES
   ========================================================================== */
.shop-wrapper-v2 {
    padding: 0 10px;
    margin-top: 20px;
}

/* Shop Pagination (Custom Template) */
.pagination-v2 .page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    gap: 0;
    border: 1px solid var(--primary);
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto;
}

.pagination-v2 .page-numbers li {
    margin: 0;
    border-left: 1px solid var(--primary);
}

.pagination-v2 .page-numbers li:last-child {
    border-left: none;
}

.pagination-v2 .page-numbers li a,
.pagination-v2 .page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    background: #fff;
    text-decoration: none;
    transition: none !important;
}

.pagination-v2 .page-numbers li span.current {
    background: var(--primary-light);
    color: var(--primary);
}

.pagination-v2 .page-numbers li a:hover {
    background: var(--primary-light);
}

/* Shop Mobile Responsive */
@media (max-width: 768px) {
    .shop-wrapper-v2 {
        padding: 0 5px;
        margin-top: 10px;
    }

    .shop-wrapper-v2 .products-grid-v3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .pagination-v2 .page-numbers li a,
    .pagination-v2 .page-numbers li span {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   HOMEPAGE SPECIFIC STYLES (Clean HTML - No Inline Styles)
   ========================================================================== */

/* Products Wrapper */
.products-wrap-v3 {
    padding: 0 10px;
}

/* Home Title Banner */
.home-title-banner {
    margin-bottom: 5px;
}

.home-title-banner .banner-box {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 1.1rem;
}

/* View More Button Container */
.view-more-wrap {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

.btn-view-more {
    display: inline-block;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    padding: 8px 40px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 5px;
    text-decoration: none;
}

.btn-view-more:hover {
    background: var(--bg-light);
}

/* Services Section Header */
.services-header {
    text-align: center;
    margin-bottom: 50px;
}

.services-header h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--secondary);
    margin-bottom: 10px;
}

.services-header p {
    color: var(--text-muted);
}

/* Categories Container */
.categories-container {
    padding-top: 10px;
    padding-bottom: 20px;
}

/* Slider Placeholder */
.slider-placeholder {
    background: #f1f3f5;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

/* Video Slider Wrapper */
.video-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.video-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    color: #fff;
}

.video-title {
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 900px;
}

.video-desc {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    opacity: 0.9;
}

.video-btn {
    background: var(--primary);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Image Slider */
.theme-slider-v2 {
    width: 100%;
    overflow: hidden;
}

.slider-img-v2 {
    width: 100%;
    object-fit: cover;
    display: block;
}

.theme-slider-v2.hide-on-desktop {
    display: none;
}

@media (max-width: 768px) {
    .theme-slider-v2.hide-on-desktop {
        display: block;
    }

    .video-desc {
        font-size: 1rem;
    }
}