@import url('https://fonts.googleapis.com/css2?family=Suranna&display=swap');

:root {
    --primary-brown: #8a5a4d;
    --dark-brown: #6b4338;
    --accent-pink: #f5dcd3;
    --bg-light: #f7f4f0;
    --card-bg: #fffefe;
    --text-dark: #222222;
    --border-color: #e0d8d0;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Removed font-family here to prevent overriding body/headings */
}

/* Apply globally to the body */
body {
    font-family: 'Suranna', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

h1, h2, h3 {
    font-family: 'Suranna', serif;
    scroll-margin-top: 100px;
}

#WishListPageH1{
    font-family: 'Suranna', serif;
    scroll-margin-top: 100px;
    font-size: 2.2rem;
    color: var(--dark-brown);
}

body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

.hidden {
    display: none !important;
}

/* Ensure html and body take up full viewport height */
html {
    height: 100%;
    scroll-behavior: smooth;
}

/* Force main content container to take all available space */
main, .main-content, #main-container {
    flex: 1 0 auto;
}

/* Footer sits naturally at bottom without overlapping content */
footer {
    flex-shrink: 0;
    margin-top: auto;
}
/* ==========================================
   PRODUCT DETAILS PAGE STYLES
   ========================================== */

.product-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    direction: rtl; /* Ensures RTL flow for Hebrew text */
}

/* Back Button */
.back-btn {
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-brown, #8b5a2b);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.back-btn:hover {
    background-color: rgba(139, 90, 43, 0.08);
    transform: translateX(4px);
}

/* Ensure Product Page Container Wraps Properly */
#SingleProductView {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}

/* Fix Single Product Image Container on Mobile */
.product-page-image {
    width: 100%;
    flex: 1 1 300px; /* Takes full width on mobile, side-by-side on desktop */
    min-height: 280px; /* Stops mobile browsers from shrinking it to 0px */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    padding: 10px;
}

.product-page-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: block;
}

/* Ensure Related Product Images Don't Shrink */
.product-card .product-image {
    width: 100%;
    height: 200px; /* Fixed height container for uniform cards */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card:Hover{
    cursor: pointer;
}

.product-image:Hover{
    cursor: pointer;
}

.product-card .product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-details-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "image details"; /* "details" on Left (col 1 in LTR/col 2 in RTL), "image" on Right */
    gap: 40px;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 60px;
    direction: rtl;
}

/* Bind image to the right area */
.product-details-card img {
    grid-area: image;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 12px;
    background-color: #fafafa;
}

/* Bind info text to the left area */
.product-page-info {
    grid-area: details;
}

/* Related Products Section */
.related-products-section {
    display: block;
    width: 100%;
    margin-top: 40px; /* Fixed: Changed from 180% */
    margin-bottom: 24px;
    clear: both;
}

#RelatedProductsList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark, #2c2c2c);
    margin-bottom: 24px;
    text-align: right;
    position: relative;
    padding-bottom: 10px;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-brown, #8b5a2b);
    border-radius: 2px;
}

/* Related Products Grid Container */
.products-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
/* --- HEADER & SEARCH --- */
.header {
    background-color: var(--primary-brown);
    color: #fff;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 1px;
    font-family: 'Suranna', serif;
}

.search-box input {
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    outline: none;
    width: 180px;
}

.header-icons {
    display: flex;
    gap: 18px;
    align-items: center;
}

.icon-btn {
    position: relative;
    cursor: pointer;
    color: #fff;
    font-size: 1.2rem;
}

.icon-btn .badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #fff;
    color: var(--primary-brown);
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- CATEGORIES BAR --- */
.categories-section {
    padding: 20px 0;
}

.categories-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    overflow-x: auto;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.category-img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    margin-bottom: 6px;
    object-fit: cover;
}

/* --- HERO BANNER & DUAL BANNERS --- */
.hero-banner {
    background-color: var(--primary-brown);
    color: #fff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 20px;
}

.banner-img-container {
    flex: 1;
}

.banner-img-container img {
    border-radius: var(--radius-sm);
    width: 100%;
}

.banner-content {
    flex: 1;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-pink);
    color: var(--dark-brown);
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.dual-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.banner-card img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--dark-brown);
    margin: 24px 0 16px;
}

/* --- PRODUCT GRID (DYNAMIC UL) --- */
.products-grid-ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-grid{
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}


.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%; /* Changed from 300px to 100% */
    max-width: 320px; /* Prevents them from getting too large */
    margin: 0 auto; /* Centers the card */
}

.product-image img {
    width: 100%; /* Fluid width */
    max-width: 100%;
    height: auto; /* Maintains aspect ratio */
    max-height: 250px; /* Slightly reduced for better mobile view */
    object-fit: contain; /* Prevents cropping */
    border-radius: var(--radius-sm);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.p-name {
    font-weight: 600;
    color: var(--text-dark);
}

.p-category {
    font-size: 0.8rem;
    color: #777;
}

.p-price {
    font-weight: bold;
    color: var(--dark-brown);
}

.old-price {
    text-decoration: line-through;
    color: #999;
    margin-left: 8px;
    font-size: 0.9rem;
}

.p-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.add-to-cart {
    background-color: var(--primary-brown);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
}

.wishlist-heart {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-brown);
}

/* --- CART MODAL --- */
/* Fullscreen overlay wrapper */
.cart-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-start; /* Aligns panel to the right side in RTL */

    /* Smooth overlay fade */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Inner drawer content panel */
.cart-modal .cart-content {
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.15);
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;

    /* Offscreen position (Right side) */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Active State (Triggered by JavaScript) */
.cart-modal.active {
    opacity: 1;
    visibility: visible;
}

.cart-modal.active .cart-content {
    transform: translateX(0); /* Slides into view */
}

.cart-items-summary {
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.cart-items-summary h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #444444;
}

.checkout-items-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.checkout-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.checkout-item-row .item-title {
    font-weight: 600;
    color: #333333;
}

.checkout-item-row .item-price {
    color: #d88195;
    font-weight: bold;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: #fff;
    width: 100%;
    max-width: 400px;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-items-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    margin: 15px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}


.cart-item-price{
    direction: ltr;
}
.cart-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
}

.item-controls-column {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}

.cart-footer {
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.shipping-notice {
    font-size: 0.8rem;
    color: green;
}

.btn-checkout {
    width: 100%;
    padding: 10px;
    background: var(--dark-brown);
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--primary-brown);
    color: #fff;
    padding: 30px 0 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: #ebdcd7;
    text-decoration: none;
}

.footer-links a:hover {
    transition: all 0.2s ease-in-out;
    font-size: 18px;
    color: var(--dark-brown);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    .products-grid-ul {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-banner {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .products-grid-ul,
    .dual-banners,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .search-box input {
        width: 120px;
    }
}

/* ==========================================
   SIDE MENU & OVERLAY STYLES
   ========================================== */

/* Dark Backdrop Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Side Menu Drawer (RTL - Slides from Right) */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Hidden off-screen by default */
    width: 280px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 999;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-menu.active {
    right: 0; /* Slides into view when active class is added */
}

/* Menu Header (Title + Close Button) */
.menu-header {
    background-color: var(--primary-brown);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.close-menu {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

/* Links Navigation List */
.menu-links {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    overflow-y: auto;
}

.menu-links li {
    border-bottom: 1px solid var(--border-color);
}

.menu-links a,
.menu-links .has-dropdown > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-links a:hover,
.menu-links .has-dropdown > span:hover {
    background-color: var(--bg-light);
    color: var(--primary-brown);
}

/* Sub-Menu Dropdown Inside Side Drawer */
.menu-links .dropdown {
    list-style: none;
    background-color: #f9f7f5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
}

/* FIX: Increase max-height so all links fit without getting cut off */
.menu-links .has-dropdown.open .dropdown {
    max-height: 1000px; /* High enough capacity to accommodate long link lists */
}
.menu-links .dropdown a {
    padding-right: 35px; /* Extra indentation for nested links */
    font-size: 0.95rem;
    color: var(--text-muted);
}

.menu-links .has-dropdown > span i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.menu-links .has-dropdown.open > span i {
    transform: rotate(180deg);
}

/* ==========================================
   CAROUSEL SLIDER STYLES
   ========================================== */

.banner-carousel {
    position: relative;
    margin-bottom: 24px;
    padding: 0 35px; /* Extra spacing on sides for arrows */
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: var(--radius-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
}

/* Side Arrows */
.banner-arrow {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--dark-brown);
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.banner-arrow:hover {
    color: var(--primary-brown);
    transform: translateY(-50%) scale(1.15);
}

/* RTL Arrow Positioning */
.prev-arrow {
    right: 2px;
}

.next-arrow {
    left: 2px;
}

/* Indicator Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #d1c7bd;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.dot:hover {
    background-color: var(--primary-brown);
}

.dot.active {
    background-color: var(--primary-brown);
    transform: scale(1.2);
}

/* Adjustments for Hero & Dual Sections */
.hero-banner {
    background-color: var(--primary-brown);
    color: #fff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    padding: 24px 30px;
    gap: 20px;
}

.dual-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
    .banner-carousel {
        padding: 0 20px;
    }
    .prev-arrow { right: 0; }
    .next-arrow { left: 0; }
}

/* ==========================================
DUAL BANNERS CAROUSEL STYLES
========================================== */

#dualBannersCarousel {
    padding: 0 45px;
    margin-bottom: 35px;
}

#dualBannersCarousel .carousel-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: var(--radius-lg);
}

/* Dynamic Grid Layout */
.dual-banners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
}

.banner-card {
    position: relative;
    width: 100%;
    min-height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    #dualBannersCarousel {
        padding: 0 25px;
    }

    .dual-banners {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .banner-card {
        min-height: 200px;
    }
}

/* ==========================================
   CATEGORIES CIRCLES SECTION
   ========================================== */

.categories-section {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap; /* Allows items to break into new rows */
    justify-content: center; /* Centers items nicely on all screen sizes */
    gap: 20px 16px; /* 20px row gap, 16px column gap */
    width: 100%;
    overflow: visible; /* Prevents any scrollbars from appearing */
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px; /* Fixed container width per item */
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: translateY(-4px);
}

.category-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color, #e5e5e5);
    margin-bottom: 8px;
}

.category-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark, #333);
    line-height: 1.2;
}


/* ==========================================
   RESPONSIVE LAYOUT (Mobile & Tablet)
   ========================================== */

@media (max-width: 868px) {
    .product-details-card {
        grid-template-columns: 1fr; /* Stack main image and details vertically */
        gap: 24px;
        padding: 20px;
    }

    .related-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on mobile screens */
        gap: 12px;
    }
}

/* ==========================================
   EXACT HERO BANNER CARD STYLING
   ========================================== */

.hero-carousel-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto 40px;
    direction: rtl;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rounded Main Card */
.hero-banner-card {
    width: 100%;
    background-color: #a46d60; /* Warm brown shade matching your mockup */
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    overflow: hidden;
    min-height: 220px;
}

/* Image on the Right (RTL First Element) */
.banner-image-side {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-image-side img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 12px;
}

/* Text Content on the Left */
.banner-text-side {
    width: 50%;
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.banner-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 1px;
    color: #f2ded9;
}

.banner-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #ffffff;
}

/* Rounded Pill Button */
.banner-action-btn {
    background-color: #e5a999; /* Light pinkish button */
    color: #4a271f;
    padding: 10px 36px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.banner-action-btn:hover {
    background-color: #f0beaf;
    transform: scale(1.03);
}

/* External Side Arrows */
.arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}

.right-arrow { right: -35px; }
.left-arrow { left: -35px; }

/* Enable Touch Swiping on Banner Containers */
.carousel-container,
#dualBannersCarousel,
.carousel-track-container,
.hero-banner-card {
    touch-action: pan-y !important; /* Critical: allows vertical page scroll while capturing horizontal swipes */
    user-select: none;
    -webkit-user-select: none;
}

/* Prevent image ghosting/dragging on mobile touch */
.carousel-container img,
#dualBannersCarousel img {
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Pink Dots Below Card */
.carousel-dots-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.carousel-dots-container .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #f3d0c7;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dots-container .dot.active {
    background-color: #a46d60;
}


/* ==========================================
   ACCESSIBILITY SECTION (LEFT SIDE)
   ========================================== */

/* Main Container & Button (Fixed Bottom Left) */
.acc-widget,
#accessibilityBtn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: auto;
    z-index: 10000;
    direction: rtl;
    font-family: inherit;
}

#accessibilityBtn,
.acc-toggle-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    background-color: #0056b3;
    color: #ffffff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#accessibilityBtn:hover,
.acc-toggle-btn:hover {
    transform: scale(1.08);
}

.acc-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Accessibility Menu Panel (Anchored Left) */
.acc-menu {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: auto;
    width: 300px;
    max-height: 80vh;
    background-color: #ffffff;
    color: #222222;
    border-radius: 12px;
    border: 1px solid #cccccc;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
}

.acc-menu.hidden {
    display: none;
}

/* Header & Body Layout */
.acc-header {
    background-color: #0056b3;
    color: #ffffff;
    padding: 12px 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acc-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.acc-close,
.acc-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
}

.acc-body {
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.acc-body hr {
    border: none;
    border-top: 1px solid #eeeeee;
    margin: 6px 0;
}

.acc-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 4px;
    color: #555555;
}

/* Controls & Buttons */
.acc-body button,
.acc-btn,
.acc-btn-sub {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cccccc;
    background-color: #f8f9fa;
    color: #333333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s ease;
}

.acc-body button:hover,
.acc-btn:hover,
.acc-btn-sub:hover {
    background-color: #e2e8f0;
}

.acc-btn.active,
.acc-btn-sub.active {
    background-color: #0056b3;
    color: #ffffff;
    border-color: #004085;
}

.acc-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.acc-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.acc-body .acc-reset,
.acc-reset-btn {
    background-color: #dc3545;
    color: #ffffff;
    border: none;
    margin-top: 5px;
}

.acc-body .acc-reset:hover,
.acc-reset-btn:hover {
    background-color: #bd2130;
}

.acc-footer {
    padding: 10px;
    background-color: #f1f1f1;
    text-align: center;
    border-top: 1px solid #eeeeee;
}

.acc-footer a {
    color: #0056b3;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

/* ==========================================
   FUNCTIONAL OVERRIDES
   ========================================== */

/* Font Sizing */
body.acc-increase-text * {
    font-size: 1.15em !important;
}

body.acc-decrease-text * {
    font-size: 0.88em !important;
}

body.acc-readable-font * {
    font-family: Arial, sans-serif !important;
}

/* Text Alignment & Spacing */
body.acc-align-right * { text-align: right !important; }
body.acc-align-center * { text-align: center !important; }
body.acc-align-left * { text-align: left !important; }
body.acc-letter-spacing * { letter-spacing: 2px !important; }
body.acc-line-height * { line-height: 2.2 !important; }

/* Visual & Contrast Overrides */
html.acc-grayscale,
body.acc-grayscale {
    filter: grayscale(100%) !important;
}

body.acc-high-contrast,
body.acc-high-contrast * {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

body.acc-highlight-links a {
    outline: 3px solid #ff0000 !important;
    background-color: #ffff00 !important;
    color: #000000 !important;
}

body.acc-hide-images img,
body.acc-hide-images picture,
body.acc-hide-images svg,
body.acc-hide-images [style*="background-image"] {
    opacity: 0 !important;
    visibility: hidden !important;
}

body.acc-stop-animations *,
body.acc-stop-animations *::before,
body.acc-stop-animations *::after {
    animation: none !important;
    transition: none !important;
}

body.acc-colored-headlines h1,
body.acc-colored-headlines h2,
body.acc-colored-headlines h3,
body.acc-colored-headlines h4,
body.acc-colored-headlines h5,
body.acc-colored-headlines h6 {
    color: #0056b3 !important;
}

body.acc-colored-text p,
body.acc-colored-text span,
body.acc-colored-text li,
body.acc-colored-text td {
    color: #111111 !important;
}

/* ==========================================
   CHECKOUT SECTION
   ========================================== */

/* Modal Overlay */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    direction: rtl;
}

.checkout-modal.hidden {
    display: none;
}

/* Modal Card */
.checkout-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    font-family: inherit;
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.cart-summary {
    background-color: #fcedf0; /* Soft cosmetic background highlight */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.cart-summary strong {
    color: #d88195; /* Primary brand color */
    font-size: 1.2rem;
}

#paymentForm label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

#paymentForm input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-sizing: border-box;
}

#paymentForm input:focus {
    outline: none;
    border-color: #d88195;
    box-shadow: 0 0 0 3px rgba(216, 129, 149, 0.2);
}

.primary-btn {
    width: 100%;
    background-color: #d88195;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.primary-btn:hover {
    background-color: #c46b80;
}

/* Add margin top to push main content below header */
.page-main {
    margin-top: 60px;
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
}

/* Standalone Checkout Card Styling */
.checkout-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    direction: rtl;
}

.checkout-content h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333333;
}

.cart-summary {
    background-color: #fcedf0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.cart-summary strong {
    color: #d88195;
    font-size: 1.2rem;
}

#checkoutForm label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333333;
}

#checkoutForm{
    margin-top: 60px;
}

#checkoutForm input {
    width: 100%;
    padding: 11px 13px;
    margin-bottom: 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#checkoutForm input:focus {
    outline: none;
    border-color: #d88195;
    box-shadow: 0 0 0 3px rgba(216, 129, 149, 0.2);
}

.primary-btn {
    width: 100%;
    background-color: #d88195;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Spinner Element Styling */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btnSpinnerRotate 0.8s linear infinite;
}

/* Spinner Keyframe Animation */
@keyframes btnSpinnerRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Prevent disabled state from halting CSS animations */
button.is-loading:disabled .btn-spinner {
    animation-play-state: running;
}

#payBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: auto; /* Keeps hover cursor active showing not-allowed */
}

/* Wrapper layout */
.tooltip-wrapper {
    position: relative;
    display: block; /* Use inline-block if button isn't full width */
    width: 100%;
}

/* Ensure disabled button lets wrapper handle hover state */
.tooltip-wrapper button:disabled {
    pointer-events: none;
}

/* Tooltip Popup Box */
.tooltip-wrapper::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%; /* Displays above the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: #222222;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

/* Show tooltip when hovering over wrapper ONLY if button is disabled */
.tooltip-wrapper:has(button:disabled):hover::after {
    opacity: 1;
    visibility: visible;
}

#SuccesfulPurchaseBtn{
    width: 100%;
    background-color: #d88195;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.primary-btn:hover {
    background-color: #c46b80;
}

#SuccesfulPurchaseBtn:hover{
    background-color: #c46b80;
}

.Icon:hover{
    cursor: pointer;
}

/* Cookie Banner Styling */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 16px 24px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    direction: rtl; /* Sets right-to-left layout for Hebrew */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 280px;
    line-height: 1.5;
}

.cookie-link {
    color: #4dabf7;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-link:hover {
    color: #74c0fc;
}

.cookie-btn {
    background-color: #22c55e;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cookie-btn:hover {
    background-color: #16a34a;
}

/* ==========================================
   WISHLIST GRID LAYOUT (2 or 3 COLUMNS)
   ========================================== */
#WishListItems {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 30px 0;
    width: 100%;
}

/* Tablet & Mobile (2 columns) */
@media (max-width: 768px) {
    #WishListItems {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
        gap: 12px;
    }
}

/* ==========================================
   COMPREHENSIVE MOBILE FIXES
   ========================================== */

@media (max-width: 768px) {
    /* Stack the Hero Banner Card vertically */
    .hero-banner-card {
        flex-direction: column;
        padding: 24px 20px;
        text-align: center;
        width: 80%;
    }

    .header-icons{
        margin-right: 10px;
    }

    .banner-image-side, 
    .banner-text-side {
        width: 80%; /* Takes full width on mobile */
    }

    .banner-image-side {
        margin-bottom: 20px;
    }

    /* Keep carousel arrows accessible on mobile */
    .arrow-btn {
        padding: 5px;
    }
    .right-arrow { right: 5px; }
    .left-arrow { left: 5px; }

    /* Adjust product details spacing */
    .related-products-section {
        margin-top: 40px; /* Fixed massive 180% margin gap */
    }
}

@media (max-width: 600px) {
    /* Wrap the header so the search bar drops to its own line */
    .header-content {
        flex-wrap: wrap;
        justify-content: space-between;
    }

        .header-icons{
        margin-right: 10px;
    }

    /* --- FOOTER --- */
    .footer {
        background-color: var(--primary-brown);
        color: #fff;
        padding: 30px 0 15px;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-right: 15px;
    }

    .search-box {
        order: 3; /* Pushes the search box below the logo and icons */
        width: 80%;
        margin-top: 12px;
        margin-right: 10px;
    }

    .search-box input {
        width: 100%; /* Full width search bar on mobile */
        border-radius: 8px; /* Slightly softer corners for a full-width bar */
    }

    .logo {
        font-size: 1.4rem; /* Slightly smaller logo for small screens */
        margin-left: 12px;
    }

    /* Ensure product grid adapts to very small screens */
    .products-grid-ul,
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 10px;
    }
}

@media (max-width: 400px) {
    /* For very small devices, drop to 1 product per row */
    .products-grid-ul,
    .product-grid,
    #WishListItems {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        max-width: 90%; /* Allow card to fill screen */
    }
}

/* ==========================================
   MOBILE RESPONSIVENESS & SEARCH TAG FIXES
   ========================================== */

/* 1. Prevent screen overflow and add safe side padding */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px; /* Adds side margins on mobile */
    box-sizing: border-box;
}

/* 2. Responsive Google Maps Iframe Fix */
main iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 350px !important;
    margin: 20px 0 !important;
    border-radius: var(--radius-sm);
}

/* 3. Responsive Search Box & Dropdown Tag Wrappers */
.search-box-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 320px;
}

.search-box {
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* Multi-row Category Tags Overlay */
.search-tags {
    display: none; /* Hidden by default */
    flex-wrap: wrap; /* Allows tags to break onto multiple lines */
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 250;
    box-sizing: border-box;
}

/* Show multi-row tags when search bar or tag area is focused */
.search-box-wrapper:focus-within .search-tags {
    display: flex;
}

.search-tag {
    background-color: #f4efeb;
    border: 1px solid #dcd3cb;
    color: var(--dark-brown);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-tag:hover {
    background-color: var(--primary-brown);
    color: #ffffff;
    border-color: var(--primary-brown);
}

/* 4. Header Alignment on Mobile Devices */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }

    .logo {
        font-size: 1.4rem;
        order: 1;
    }

    .header-icons {
        order: 2;
    }

    .search-box-wrapper {
        order: 3; /* Moves search bar underneath logo & icons on phones */
        max-width: 100%;
    }
}

/* Quick Search Category Tags Bar */
.search-box-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.search-tags {
    display: none; /* Hidden by default until focused */
    flex-wrap: wrap; /* Allows buttons to wrap into multiple rows */
    justify-content: center; /* Centers the tag rows nicely */
    gap: 6px;
    margin-top: 8px;
    width: 100%;
    padding: 4px 0;
}

.search-tags::-webkit-scrollbar {
    display: none;
}

/* Reveal tags when search box or tags are focused */
.search-box-wrapper:focus-within .search-tags {
    display: flex;
}

.search-tag {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-tag:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

