:root {
    --primary-color: #7F543D; /* Earthy Brown/Bronze */
    --secondary-color: #DBE2DC; /* Light Greyish/Green Background */
    --text-dark: #333;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}

/* Top Notification Bar */
.top-bar {
    background-color: var(--primary-color); /* Updated to match primary */
    color: white;
    font-size: 0.85rem;
    padding: 8px 0;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.nav-link {
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin: 0 10px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px; /* Consistent spacing between all items */
}

.nav-icons .btn-icon {
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    padding: 5px;
    transition: color 0.3s;
}

.nav-icons .btn-icon:hover {
    color: var(--primary-color);
}

/* Styles for Stacked User Info Block */
.nav-user-block {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-dark);
    text-align: left;
    transition: all 0.3s;
}

.nav-user-block:hover {
    color: var(--primary-color);
}

/* Force the subtext to change color on hover too */
.nav-user-block:hover .nav-user-sub {
    color: var(--primary-color) !important;
}

.nav-user-block i {
    font-size: 1.5rem; /* Slightly larger icon for balance */
}

.nav-user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-user-title {
    font-weight: 700;
    font-size: 0.85rem;
}

.nav-user-sub {
    font-size: 0.75rem;
    color: #777;
    font-weight: 400;
    transition: color 0.3s;
}


/* --- USER ACCOUNT NAVBAR STYLES --- */

/* 1. The Circular Avatar */
.user-avatar-circle {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color); /* Earthy Brown */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(127, 84, 61, 0.2); /* Soft brown shadow */
}

.user-avatar-circle i {
    font-size: 1.1rem;
}

/* Hover effect: darkening slightly */
.nav-user-block:hover .user-avatar-circle {
    background-color: #654330;
    transform: translateY(-2px);
}

/* Hide default arrow */
.remove-caret::after {
    display: none !important;
}

/* 2. The Dropdown Container - PREMIUM LOOK */
.custom-user-dropdown {
    min-width: 240px;
    padding: 0;
    margin-top: 15px !important; /* Spacing from header */
    border: none; /* Remove harsh border */
    border-radius: 12px; /* More rounded corners */
    background-color: #fff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); /* Deep, soft shadow */
    overflow: hidden;
    animation: slideInFade 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 3. Dropdown Header (The "Welcome" part) */
.custom-user-dropdown li:first-child {
    background-color: var(--secondary-color); /* Use your light grey/green background */
    padding: 20px 15px !important;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.custom-user-dropdown .fw-bold.text-primary {
    font-family: var(--font-heading); /* Playfair Display */
    color: var(--primary-color) !important;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.custom-user-dropdown small.text-muted {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.7rem !important;
    letter-spacing: 1px;
    color: #888 !important;
}

/* 4. Dropdown Links */
.custom-user-dropdown .dropdown-item {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 12px 20px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent; /* marker for hover */
    display: flex;
    align-items: center;
}

.custom-user-dropdown .dropdown-item i {
    width: 25px; /* Fixed width for icon alignment */
    color: #999;
    font-size: 1rem;
    transition: color 0.2s;
}

/* Hover State */
.custom-user-dropdown .dropdown-item:hover {
    background-color: #fff; /* Keep background white */
    color: var(--primary-color); /* Brown Text */
    border-left-color: var(--primary-color); /* Brown accent on left */
    padding-left: 25px; /* Slight slide animation */
}

.custom-user-dropdown .dropdown-item:hover i {
    color: var(--primary-color);
}

/* 5. Sign Out Link Specifics */
.custom-user-dropdown .text-danger {
    color: #d63031 !important;
}

.custom-user-dropdown .text-danger:hover {
    background-color: #fff5f5 !important; /* Very light red bg */
    color: #d63031 !important;
    border-left-color: #d63031 !important;
}
.custom-user-dropdown .text-danger:hover i {
    color: #d63031 !important;
}

/* 6. Divider */
.custom-user-dropdown .dropdown-divider {
    margin: 5px 0;
    border-color: #f0f0f0;
}


/* =========================================
   MOBILE BOTTOM NAVIGATION
   ========================================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 1040; /* Above most content, below modals (1050) */
    box-shadow: 0 -2px 15px rgba(0,0,0,0.08); /* Soft upward shadow */
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-top: solid 2px rgba(0,0,0,0.1);

    /* Support for iPhone Home Bar area */
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #323232; /* Default inactive color */
    font-family: var(--font-body);
    font-size: 0.7rem; /* Small label text */
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    width: 25%; /* Equal width for touch targets */
}

.bottom-nav-link i {
    font-size: 1.3rem; /* Icon size */
    margin-bottom: 4px;
    transition: transform 0.2s;
}

/* Hover & Active States */
.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--primary-color); /* Changes to Earthy Brown */
}

.bottom-nav-link.active i {
    transform: translateY(-2px); /* Subtle lift for active tab */
}

/* Mobile Cart Badge */
.cart-badge-mobile {
    position: absolute;
    top: -2px;
    right: calc(50% - 18px); /* Center relative to icon width */
    background-color: #d63031; /* Red alert color */
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff; /* White border to separate from icon */
}

/* --- SEARCH MODAL STYLES (MATCHING THEME) --- */

/* Modal Background */
#SearchModal .modal-content {
    background-color: #ffffff;
    border: none;
}

/* Close Button (Top Right) */
#SearchModal .custom-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    color: #999;
    transition: all 0.3s ease;
    z-index: 1056;
}

#SearchModal .custom-close-btn:hover {
    color: var(--primary-color); /* Uses Earthy Brown */
    transform: rotate(90deg);
}

/* Container width */
#SearchModal .search-container {
    width: 100%;
    max-width: 650px;
    padding: 0 20px;
}

/* Heading Style */
#SearchModal h2 {
    font-family: var(--font-heading); /* Playfair Display */
    color: var(--text-dark);
    font-weight: 700;
    font-size: 2.5rem;
}

/* Input Styling */
#SearchModal .search-input-custom {
    height: 60px;
    font-family: var(--font-body); /* Lato */
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 50px 0 0 50px; /* Pill shape left */
    padding-left: 30px;
    box-shadow: none !important;
    transition: border-color 0.3s ease;
    background-color: #fcfcfc;
}

#SearchModal .search-input-custom:focus {
    border-color: var(--primary-color); /* Earthy Brown Border */
    background-color: #fff;
}

/* Search Button Styling */
#SearchModal .search-btn-custom {
    background-color: var(--primary-color); /* Earthy Brown */
    border: 2px solid var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 0 40px;
    border-radius: 0 50px 50px 0; /* Pill shape right */
    transition: all 0.3s ease;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#SearchModal .search-btn-custom:hover {
    background-color: #654330; /* Your darker brown hover shade */
    border-color: #654330;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(127, 84, 61, 0.3);
}

@media (max-width: 768px) {

    /* 1. Make the Heading smaller */
    #SearchModal h2 {
        font-size: 1.8rem; /* Smaller than desktop 2.5rem */
        margin-bottom: 20px !important;
    }

    /* 2. Resize the Input Field */
    #SearchModal .search-input-custom {
        height: 50px; /* Reduce height */
        font-size: 1rem; /* Smaller font */
        padding-left: 20px; /* Less empty space on left */
    }

    /* 3. Resize the Button */
    #SearchModal .search-btn-custom {
        padding: 0 20px; /* Reduce side padding significantly */
        font-size: 0.9rem;
    }

    /* 4. Adjust Close Button position */
    #SearchModal .custom-close-btn {
        top: 15px;
        right: 15px;
        font-size: 2rem;
    }

    /* 5. Ensure Container has breathing room */
    #SearchModal .search-container {
        padding: 0 15px; /* Ensure edges don't touch screen */
    }
}





/* NEW HERO SECTION STYLES (Split & Curved) */
.hero-split-section {
    background-color: #fff;
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}

.highlight-pill {
    display: inline-block;
    background-color: rgba(212, 78, 104, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    width: auto;
}


.hero-left-col {
    padding: 50px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 2;
    height: 100%;
}

.hero-right-col {
    padding: 0;
    position: relative;
}

/* The Curve Effect */
.hero-carousel-container {
    height: 600px;
    width: 100%;
    border-bottom-left-radius: 250px; /* The massive curve */
    overflow: hidden;
    position: relative;
}

.carousel-item img {
    height: 600px;
    width: 100%;
    object-fit: cover;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    max-width: 500px;
}

/* Adjusted Search Widget for Hero */
.hero-search-wrapper {
    background: white;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-search-wrapper input {
    border: none;
    padding: 12px 15px;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

.hero-search-wrapper .separator {
    width: 1px;
    height: 30px;
    background: #ddd;
}

.btn-hero-search {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-hero-search:hover {
    background-color: #654330; /* Darker shade of brown */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(127, 84, 61, 0.3); /* Brown shadow */
}

/* Feature badges below search */
.hero-badges {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}
.hero-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}
.hero-badge i {
    color: var(--primary-color);
    background: var(--secondary-color); /* Uses the new light grey/green */
    padding: 8px;
    border-radius: 50%;
}

/* Arched Categories */
.arch-card {
    position: relative;
    /* overflow: hidden; Removed from parent to rely on container clipping */
    margin-bottom: 30px;
    transition: transform 0.3s;
    cursor: pointer;
}

.arch-card:hover {
    transform: translateY(-5px);
}

/* The specific Mughal Arch shape */
.arch-img-container {
    width: 100%;
    padding-bottom: 130%; /* Aspect ratio */
    position: relative;

    /* Arch shape */
    border-top-left-radius: 50% 30%;
    border-top-right-radius: 50% 30%;

    overflow: hidden;
    /* FIXED: Use white background to mask any sub-pixel transparency gaps */
    background-color: #fff;

    /* FIXED: Force GPU rendering and robust masking */
    transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    isolation: isolate;
}

/* Adding a border decoration to mimic the reference frame */
.arch-border {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 0;
    border: 2px solid rgba(255,255,255,0.7);
    border-bottom: none;
    border-top-left-radius: 50% 30%;
    border-top-right-radius: 50% 30%;
    pointer-events: none;
    z-index: 2;
}

.arch-img-container img {
    position: absolute;
    /* FIXED: Use pixel calculation to ensure physical overlap of 1px on all sides */
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    top: -1px;
    left: -1px;

    /* FIXED: Apply border radius to image as well to prevent corner bleed */
    border-top-left-radius: 50% 30%;
    border-top-right-radius: 50% 30%;

    object-fit: cover;
    transition: transform 0.5s;
    z-index: 1;
    will-change: transform; /* Hint to browser to optimize rendering */
}

.arch-card:hover img {
    transform: scale(1.05);
}

.arch-title {
    text-align: center;
    margin-top: 15px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* Vendor Grid (WeddingWire style) */
.vendor-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    transition: 0.3s;
}

.vendor-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.vendor-img {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.vendor-body {
    padding: 15px;
    background: white;
}

.vendor-cat {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vendor-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 5px 0;
}

.rating {
    color: #ffc107;
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter-section {
    background-color: var(--secondary-color);
    padding: 60px 0;
    text-align: center;
}

.newsletter-input {
    border: none;
    border-bottom: 2px solid var(--text-dark);
    background: transparent;
    padding: 10px;
    width: 300px;
    margin-right: 10px;
    outline: none;
}

/* Footer */
footer {
    background-color: #222;
    color: #fff;
    padding: 50px 0 20px;
}

footer h5 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
}

footer ul li {
    margin-bottom: 10px;
}

footer a {
    color: #ccc;
    text-decoration: none;
}

footer a:hover {
    color: white;
}

/* Responsive adjustments */
/* Medium Screen (Tablet) & Mobile adjustments */
@media (max-width: 991px) {
    .hero-left-col {
        padding: 30px 20px;
        text-align: center;
        align-items: center;
    }
    .hero-title { font-size: 3rem; }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-badges { justify-content: center; }

    .hero-carousel-container {
        height: 400px;
        border-bottom-left-radius: 0; /* Remove side curve when stacked */
        margin-top: 20px;
    }
    /* Hide desktop login in navbar on mobile, show hamburger version */
    .nav-user-block { display: none; }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }

    .hero-search-wrapper {
        flex-direction: column;
        border-radius: 15px;
        width: 100%;
    }
    .hero-search-wrapper .separator {
        width: 100%;
        height: 1px;
        margin: 5px 0;
    }
    .btn-hero-search { width: 100%; }
    .hero-carousel-container { height: 350px; }
}


/* CONTACT PAGE SPECIFIC STYLES */
.page-header {
    background-color: var(--secondary-color);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 10px;
}

.breadcrumb {
    justify-content: center;
    font-size: 0.9rem;
    color: #666;
}


/* --- SHOP SPECIFIC STYLES --- */

/* Page Header */
.shop-header {
    background-color: var(--secondary-color);
    padding: 40px 0;
    text-align: center;
    margin-bottom: 40px;
}

.shop-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.breadcrumb-custom a {
    color: #666;
    text-decoration: none;
}

.breadcrumb-custom .active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Sidebar Container */
.filter-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- NEW MODERN CATEGORY TREE --- */
.cat-tree-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

/* Force remove bullets/indent for nested lists in case of theme conflict */
.cat-tree-list ul, .cat-tree-list li {
    list-style-type: none !important;
}

.cat-tree-item {
    position: relative;
}

/* Flex container for the category row */
.cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    cursor: pointer;
    transition: 0.2s;
}

.cat-row:hover {
    color: var(--primary-color);
}

.cat-label {
    font-size: 0.95rem;
    font-weight: 500;
    flex-grow: 1;
    padding-left: 10px;
    color: #555;
    transition: color 0.2s;
}

/* Checkbox styling adjustment */
.cat-checkbox {
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Toggle Icon */
.cat-toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: 0.3s;
    color: #999;
}

.cat-toggle-icon:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

/* Rotate icon when collapsed */
.cat-toggle-btn[aria-expanded="true"] .cat-toggle-icon {
    transform: rotate(180deg);
}

/* Sub-list with Guide Lines */
.cat-sub-list {
    list-style: none;
    padding-left: 0;
    margin-left: 12px; /* Indent from parent */
    border-left: 1px dashed #ddd; /* The vertical guide line */
}

.cat-sub-item {
    position: relative;
    padding-left: 15px; /* Space between line and content */
}

/* Horizontal connector line */
.cat-sub-item::before {
    content: "";
    position: absolute;
    top: 18px; /* Vertically center with text */
    left: 0;
    width: 10px;
    height: 1px;
    background-color: #ddd;
}

.cat-sub-item .cat-label {
    font-size: 0.9rem;
    font-weight: 400;
}

/* --- DUAL RANGE SLIDER CSS --- */
.wrapper-slider {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 10px;
}

.slider-track {
    width: 100%;
    height: 5px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 5px;
    background: #ddd; /* Grey background */
}

/* The colored active bar */
.slider-track-active {
    position: absolute;
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
    z-index: 1;
}

.input-range {
    appearance: none;
    width: 100%;
    height: 5px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    pointer-events: none; /* Let clicks pass through to track */
    z-index: 2;
}

/* Thumb Styles (Chrome/Safari) */
.input-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    pointer-events: auto; /* Re-enable pointer events for thumb */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.input-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Thumb Styles (Firefox) */
.input-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -10px;
}

/* --- PRODUCT CARD STYLES --- */
.product-card {
    border: none;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    background: #fff;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    padding-top: 100%;
    background-color: #f8f8f8;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

/* Product Actions (Buttons) */
.product-actions {
    position: absolute;
    bottom: -100px; /* Hidden initially - offset to fully hide */
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    transition: bottom 0.3s ease;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.product-card:hover .product-actions {
    bottom: 0;
}

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-action:hover {
    background: var(--primary-color);
    color: white;
}

.badge-custom {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 2;
}

.product-info {
    padding-top: 15px;
    text-align: center;
}

.product-cat {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 5px;
    font-weight: 400;
}

/* Pagination */
.pagination .page-link {
    color: var(--text-dark);
    border: none;
    margin: 0 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

.pagination .page-link:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

/* Mobile Filter Toggle Button */
.mobile-filter-btn {
    position: fixed;
    bottom: 70px!important;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background-color: var(--text-dark);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: none; /* Hidden on Desktop */
    border: none;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .mobile-filter-btn {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .sidebar-desktop {
        display: none;
    }
    .shop-header {
        padding: 30px 0;
    }
    .shop-title {
        font-size: 2rem;
    }
}





/* =========================================
   PRODUCT DETAILS PAGE STYLES
   ========================================= */

/* --- Layout & Typography --- */
.product-detail-container {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Breadcrumb overrides to match theme */
.breadcrumb-item a {
    color: #888;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 600;
}

/* --- Gallery Section (Left Column) --- */
.main_image {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    /* Soft shadow to lift the product */
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.thumbnail_images {
    width: 100%;
    overflow-x: auto; /* Allow scrolling on mobile */
}

.thumbnail_images ul {
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.thumbnail_images ul li {
    list-style: none;
    margin: 0 !important;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail_images ul li img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Hover & Active State for Thumbnails */
.thumbnail_images ul li:hover,
.thumbnail_images ul li.active {
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(127, 84, 61, 0.2);
}

/* --- Product Info Section (Right Column) --- */
.right-side {
    position: relative;
}

/* Title */
.product_text strong {
    font-family: var(--font-heading);
    color: var(--text-dark) !important; /* Override inline grey */
    font-size: 2.2rem;
    line-height: 1.2;
}

/* Short Description */
#product-erp {
    font-family: var(--font-body);
    font-size: 0.95rem !important;
    color: #666 !important;
    margin-top: 10px;
    line-height: 1.6;
}

/* Price Formatting */
.product_price strong {
    font-size: 1.8rem;
    color: var(--primary-color) !important; /* Force primary color */
    font-weight: 700;
}

.normal_price {
    font-size: 1.1rem;
    color: #999 !important;
    margin-left: 10px;
}

/* --- Forms & Selectors --- */

/* Dropdown styling */
.attribute-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
}

.attribute-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(127, 84, 61, 0.15); /* Primary color glow */
}

/* Quantity Selector Styling */
.input-group.df {
    max-width: 160px;
    border: 1px solid #ddd;
    border-radius: 50px; /* Pill shape */
    overflow: hidden;
    margin: 0 !important; /* Reset margin alignment */
}

.input-group.df .btn {
    background: #fff;
    border: none !important;
    color: var(--text-dark);
    padding: 0 15px;
    font-size: 1.1rem;
    transition: 0.2s;
}

.input-group.df .btn:hover {
    background: #f8f8f8;
    color: var(--primary-color);
}

.input-group.df .form-control {
    border: none;
    text-align: center;
    font-weight: 700;
    color: var(--text-dark);
    background: transparent;
    padding: 10px 0;
}

/* Remove spin buttons from number input */
.input-group.df .form-control::-webkit-inner-spin-button,
.input-group.df .form-control::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Action Buttons (Buy Now / Add to Cart) --- */
.buttons .btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    flex: 1; /* Make them equal width */
    transition: all 0.3s ease;
}

/* Override Bootstrap Dark Button to match Theme */
.buttons .btn-dark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.buttons .btn-dark:hover {
    background-color: #654330; /* Darker shade of brown */
    border-color: #654330;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(127, 84, 61, 0.3);
}

/* Override Bootstrap Outline Button */
.buttons .btn-outline-dark {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.buttons .btn-outline-dark:hover {
    background-color: var(--text-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* Disabled State */
.buttons .btn:disabled {
    background-color: #ccc;
    border-color: #ccc;
    transform: none;
    box-shadow: none;
}

/* --- Description / Tabs Section --- */
.card-header {
    background: transparent;
    border-bottom: 2px solid var(--secondary-color);
    font-family: var(--font-heading);
    color: var(--text-dark) !important;
    font-weight: 600;
}

#ItemDescription {
    color: #555;
    line-height: 1.7;
    font-family: var(--font-body);
}

/* Table styling within description */
#ItemDescription table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

#ItemDescription th,
#ItemDescription td {
    padding: 12px;
    border: 1px solid #eee;
}

#ItemDescription th {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    font-weight: 600;
}

/* --- Notifications --- */
.alert.notification {
    border-radius: 4px;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .product_text strong {
        font-size: 1.8rem;
    }

    .buttons {
        flex-direction: column; /* Stack buttons on mobile */
    }

    .buttons .btn {
        width: 100%;
    }

    .right-side {
        padding-left: 0 !important;
        margin-top: 30px;
    }

    .thumbnail_images ul {
        justify-content: flex-start; /* Align left on mobile for scrolling */
        flex-wrap: nowrap;
        padding-bottom: 10px !important;
    }
}

/* Force the container to be a horizontal row */
.input-group.df {
    display: flex !important;
    flex-wrap: nowrap !important; /* vital: prevents stacking */
    align-items: center !important;
    justify-content: space-between !important;

    /* Size & Shape */
    max-width: 140px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 50px;
    background: #fff;
    padding: 0 5px; /* slight padding from edges */
    margin: 0 !important; /* Override auto margins */
}

/* Style the Plus/Minus Buttons */
.input-group.df .btn {
    width: 35px !important;
    height: 35px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 50% !important;

    /* Center the icon inside the button */
    display: flex !important;
    align-items: center;
    justify-content: center;

    /* Icon Color */
    color: #333;
    font-size: 1.2rem;
    flex: 0 0 auto; /* Stop button from shrinking */
    box-shadow: none !important;
}

/* Hover effect for buttons */
.input-group.df .btn:hover {
    background-color: #f0f0f0 !important;
    color: var(--primary-color) !important;
}

/* Style the Number Input */
.input-group.df .form-control {
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 100% !important;

    /* Font style */
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;

    /* Layout */
    width: auto !important;
    flex-grow: 1; /* Fill space between buttons */
    box-shadow: none !important;
}

/* Hide the default tiny up/down arrows in number inputs */
.input-group.df input[type=number]::-webkit-inner-spin-button,
.input-group.df input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}










/* =========================================
   CART PAGE SPECIFIC STYLES
   ========================================= */

/* General Layout */
.cart-section {
    background-color: #fff;
}

.cart-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* Cart Table Styling - Desktop Default */
.cart-table {
    width: 100%;
    margin-bottom: 0;
}

.cart-table thead th {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--secondary-color);
    padding: 15px 10px;
    border-top: none;
    background-color: transparent;
}

.cart-table tbody td {
    vertical-align: middle;
    padding: 20px 10px;
    border-bottom: 1px solid #eee;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    background-color: #f8f8f8;
}

.cart-item-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.cart-price {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    white-space: nowrap;
}

/* Custom Vertical Quantity Control */
.cart-qty-group {
    display: flex;
    flex-direction: column; /* Vertical by default on Desktop */
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
    width: 36px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-qty-up,
.btn-qty-down {
    width: 100%;
    border: none;
    background: transparent;
    color: #666;
    padding: 10px 0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-qty-up:hover,
.btn-qty-down:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.qty-display {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 2px 0;
    color: var(--text-dark);
    text-align: center;
    width: 100%;
}

/* Remove Item Button */
.btn-remove-cart {
    color: #999;
    border: 1px solid transparent;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: transparent;
}

.btn-remove-cart:hover {
    background-color: #fff0f0;
    color: #dc3545;
    border-color: #fadbd8;
}

/* Empty Cart State */
.cart-empty-message {
    padding: 60px 20px;
    max-width: 500px;
}

.empty-cart-icon i {
    font-size: 4rem;
    color: var(--secondary-color);
}

.cart-empty-message h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 20px 0 10px;
}

/* Cart Summary Box */
.cart-summary-box {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    position: sticky;
    top: 100px;
}

.summary-title {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.summary-divider {
    border-color: #ddd;
    opacity: 0.5;
    margin-bottom: 20px;
}

.summary-table {
    width: 100%;
}

.summary-table td {
    padding: 8px 0;
    font-size: 0.95rem;
    color: #666;
}

.summary-table,
.summary-table tr,
.summary-table td {
    background-color: transparent !important;
}

.summary-table .text-end {
    color: var(--text-dark);
    font-weight: 600;
}

.summary-table .total-row td {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 10px;
    font-size: 1.2rem;
    /*font-family: var(--font-heading);*/
    color: var(--primary-color);
}

/* Primary Button Override for Cart */
.cart-summary-box .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: all 0.3s;
    color: white;
}

.cart-summary-box .btn-primary:hover {
    background-color: #654330;
    border-color: #654330;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(127, 84, 61, 0.3);
}

.cart-summary-box .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    margin-top: 10px;
    width: 100%;
    display: block;
    text-align: center;
}

.cart-summary-box .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}


/* =========================================
   MOBILE RESPONSIVENESS (Card Layout)
   ========================================= */

@media (max-width: 768px) {
    /* Hide Table Headers */
    .cart-table thead {
        display: none;
    }

    /* Make Row act like a Card */
    .cart-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        position: relative; /* For absolute positioning of delete button */
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }

    /* Reset cell styles to be blocks/flex items */
    .cart-table tbody td {
        border: none;
        padding: 5px 0;
    }

    /* 1. Product Cell: Full Width at top */
    .cart-table tbody td:nth-child(1) {
        width: 100%;
        order: 1;
        margin-bottom: 15px;
        padding-right: 30px; /* Make space for delete button */
    }

    .cart-item-img {
        width: 60px;
        height: 60px;
    }

    .cart-item-title {
        font-size: 0.95rem;
    }

    /* 2. Quantity Cell: Bottom Left */
    .cart-table tbody td:nth-child(2) {
        order: 2;
        width: auto;
    }

    /* Switch Quantity to Horizontal on Mobile */
    .cart-qty-group {
        flex-direction: row;
        width: auto;
        height: 36px;
        padding: 0 5px;
    }

    .btn-qty-up,
    .btn-qty-down {
        width: 30px;
        height: 100%;
    }

    .qty-display {
        width: 30px;
        border-left: 1px solid #eee;
        border-right: 1px solid #eee;
    }

    /* 3. Price Cell: Bottom Right */
    .cart-table tbody td:nth-child(3) {
        order: 3;
        width: auto;
        margin-left: auto; /* Push to right */
        display: flex;
        align-items: center;
    }

    .cart-price {
        font-size: 1.1rem;
        color: var(--primary-color);
    }

    /* 4. Delete Cell: Absolute Top Right */
    .cart-table tbody td:nth-child(4) {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 0;
        width: auto;
    }

    .btn-remove-cart {
        width: 30px;
        height: 30px;
        color: #dc3545; /* Red by default on mobile for visibility */
        background-color: #fff0f0;
    }
}





/* =========================================
   LOGIN / REGISTER MODAL STYLES
   ========================================= */

/* --- Modal Container & Card Overrides --- */
#LoginRegisterModal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

#LoginRegisterModal .modal-body {
    padding: 0;
}

#LoginRegisterModal .card {
    border: none;
    box-shadow: none;
}

/* --- Tab Navigation (Header) --- */
#LoginRegisterModal .card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding-top: 20px;
    padding-bottom: 0;
}

#LoginRegisterModal .nav-tabs {
    border-bottom: none;
    gap: 20px;
}

#LoginRegisterModal .nav-link {
    border: none;
    background: transparent;
    color: #999;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

#LoginRegisterModal .nav-link:hover {
    color: var(--primary-color);
}

#LoginRegisterModal .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-bottom: 3px solid var(--primary-color);
}

/* Close button positioning */
#LoginRegisterModal .btn-close {
    opacity: 0.5;
    transition: 0.3s;
    background-size: 0.8rem;
}
#LoginRegisterModal .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* --- Form Elements --- */
#LoginRegisterModal .form-floating > .form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fcfcfc;
}

#LoginRegisterModal .form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(127, 84, 61, 0.15); /* Primary color glow */
    background-color: #fff;
}

#LoginRegisterModal .form-floating > label {
    color: #888;
}

/* --- Buttons & Links --- */
#LoginRegisterModal .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px;
    border-radius: 50px; /* Pill shape to match main theme */
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

#LoginRegisterModal .btn-primary:hover {
    background-color: #654330; /* Darker brown */
    box-shadow: 0 4px 12px rgba(127, 84, 61, 0.3);
    transform: translateY(-2px);
}

/* Links (Forgot Password / Create One) */
#LoginRegisterModal .text-primary {
    color: var(--primary-color) !important;
}

#LoginRegisterModal .cursor-pointer {
    cursor: pointer;
    transition: color 0.2s;
}

#LoginRegisterModal .cursor-pointer:hover {
    color: #654330 !important; /* Darker brown on hover */
}

/* --- Alerts & Icons --- */
#LoginRegisterModal .alert {
    border-radius: 8px;
    font-size: 0.9rem;
    border: none;
}
#LoginRegisterModal .alert-danger {
    background-color: #fff2f2;
    color: #d63031;
}

/* Forgot Password Icon */
#ForgotPasswordEmailSentView i {
    color: var(--secondary-color) !important; /* Uses your theme secondary color */
}

/* =========================================
   ANIMATIONS (Slide/Fade Logic)
   ========================================= */

.slide_open_animation {
    animation: slideInFade 0.5s forwards;
}

.slide_close_animation {
    animation: slideOutFade 0.5s forwards;
}

@keyframes slideInFade {
    0% {
        opacity: 0;
        transform: translateX(30px);
        display: none;
    }
    1% {
        display: block;
        opacity: 0;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        display: block;
    }
}

@keyframes slideOutFade {
    0% {
        opacity: 1;
        transform: translateX(0);
        display: block;
    }
    99% {
        opacity: 0;
        transform: translateX(-30px);
        display: block;
    }
    100% {
        display: none;
        opacity: 0;
    }
}



/* =========================================
   CHECKOUT MODAL STYLES
   ========================================= */

/* 1. Modal Container - Soft edges and premium shadow */
#CheckoutAddressModal .modal-content {
    border: none;
    border-radius: 16px; /* Matches the rounded look of your dropdowns */
    box-shadow: 0 15px 40px rgba(0,0,0,0.15); /* Deep shadow for depth */
    font-family: var(--font-body);
    overflow: hidden;
}

/* 2. Header - Clean white with Serif Typography */
#CheckoutAddressModal .modal-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 20px 30px;
}

#CheckoutAddressModal .modal-title {
    font-family: var(--font-heading); /* Playfair Display */
    color: var(--primary-color); /* Earthy Brown */
    font-weight: 700;
    font-size: 1.8rem;
}

/* Custom Close Button styling to match Search Modal logic */
#CheckoutAddressModal .btn-close {
    transition: all 0.3s ease;
    background-size: 1rem;
    opacity: 0.6;
}

#CheckoutAddressModal .btn-close:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: rotate(90deg); /* Interactive twist effect */
}

/* 3. Body Layout */
#CheckoutAddressModal .modal-body {
    padding: 30px;
    background-color: #fff;
}

/* Section Headings (Your Address, Contact Info) */
#CheckoutAddressModal h6 {
    font-family: var(--font-body);
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

/* decorative line after heading */
#CheckoutAddressModal h6::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #eee;
    margin-left: 15px;
}

/* 4. Form Inputs (Floating Labels) */
#CheckoutAddressModal .form-floating {
    margin-bottom: 15px !important; /* Uniform spacing */
}

#CheckoutAddressModal .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px; /* Slightly softer than standard */
    background-color: #fcfcfc; /* Very light grey, matches search input logic */
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#CheckoutAddressModal .form-control:focus {
    background-color: #fff;
    border-color: var(--primary-color); /* Bronze border on focus */
    box-shadow: 0 0 0 4px rgba(127, 84, 61, 0.1); /* Soft bronze glow */
}

/* Floating Label Text */
#CheckoutAddressModal .form-floating label {
    color: #999;
    font-family: var(--font-body);
}

#CheckoutAddressModal .form-control:focus ~ label {
    color: var(--primary-color); /* Label turns bronze on focus */
}

/* Readonly fields (Country) */
#CheckoutAddressModal .form-control[readonly] {
    background-color: #f2f2f2;
    color: #666;
    border-color: #eee;
}

/* 5. Footer and Buttons */
#CheckoutAddressModal .modal-footer {
    background-color: #fafafa; /* Subtle contrast from body */
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 20px 30px;
}

/* Primary Action Button (Continue) */
#CheckoutAddressModal .btn-primary {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 50px; /* Pill shape */
    padding: 12px 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.80rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(127, 84, 61, 0.2);
}

#CheckoutAddressModal .btn-primary:hover {
    background-color: #654330; /* Darker brown */
    border-color: #654330;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(127, 84, 61, 0.35);
}

/* Secondary Action Button (Close) */
#CheckoutAddressModal .btn-secondary {
    background-color: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 50px; /* Pill shape */
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.80rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

#CheckoutAddressModal .btn-secondary:hover {
    background-color: #f5f5f5;
    color: #333;
    border-color: #ccc;
}

#CheckoutAddressModal .modal-footer .row {
    display: flex;
    align-items: stretch; /* Ensures both columns are same height */
}

#CheckoutAddressModal .modal-footer .col {
    display: flex; /* Allows the button inside to stretch */
}

#CheckoutAddressModal .modal-footer .btn {
    width: 100%;
    height: 100%;       /* Force button to match the tallest neighbor */
    min-height: 54px;   /* Standard minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal; /* Allow text to wrap if needed */
    line-height: 1.2;    /* Tighter line height for multi-line text */
}


#CheckoutAddressModal .btn-secondary:hover {
    background-color: #f5f5f5;
    color: #333;
    border-color: #ccc;

    /* These two lines add the matching "pop" effect */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}







:root {
    --fab-main-color: #7F543D; /* Bootstrap Primary */
    --fab-whatsapp-color: #25D366;
    --fab-phone-color: #343a40;
    --fab-size: 60px;
    --fab-child-size: 50px;
    --fab-spacing: 20px; /* Distance from bottom/right edge */
}




/* The Container - Fixed to bottom right */
.fab-wrapper {
    position: fixed;
    bottom: 70px;
    right: var(--fab-spacing);
    z-index: 1050;
    width: var(--fab-size);
    height: var(--fab-size);

    /* Flex center to align the items internally */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Hidden initially for scroll effect */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Class added via JS when scrolled */
.fab-wrapper.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Main Toggle Button */
.fab-main-btn {
    width: var(--fab-size);
    height: var(--fab-size);
    background-color: var(--fab-main-color);
    border-radius: 50%;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(119, 58, 58, 0.4);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2; /* Ensures trigger is always on top of the stack */
    transition: all 0.3s ease;
}

.fab-main-btn:hover {
    transform: scale(1.1);
    background-color: #6e3f2f;
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(140, 72, 63, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

/* Icon rotation logic */
.fab-icon-main {
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
}

.fab-icon-close {
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
    opacity: 0;
    transform: rotate(-180deg);
}

/* State: Open */
.fab-wrapper.is-open .fab-icon-main {
    opacity: 0;
    transform: rotate(180deg);
}

.fab-wrapper.is-open .fab-icon-close {
    opacity: 1;
    transform: rotate(0);
}

.fab-wrapper.is-open .fab-main-btn {
    background-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    animation: none;
}

/* Option Buttons (Children) - ABSOLUTE POSITIONING */
/* This ensures they hide BEHIND the main button and don't affect layout height */
.fab-action {
    position: absolute;
    bottom: 5px; /* Start centered behind the main button */
    left: 50%;
    transform: translateX(-50%) scale(0.5); /* Centered horizontally */

    width: var(--fab-child-size);
    height: var(--fab-child-size);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);

    opacity: 0;
    visibility: hidden;
    z-index: 1; /* Behind the trigger */
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Tooltip styling */
.fab-action::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px; /* To the left of the button */
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.fab-action:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Action Colors */
.btn-whatsapp { background-color: var(--fab-whatsapp-color); }
.btn-whatsapp:hover { background-color: #1ebe57; color: white; }

.btn-phone { background-color: var(--fab-phone-color); }
.btn-phone:hover { background-color: #23272b; color: white; }

/* Reveal Animation - MOVING UPWARDS */
/* These 'bottom' values push the buttons up */

.fab-wrapper.is-open .fab-action {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1); /* Reset scale, keep centered */
}

/* First item (Phone) goes up 70px */
.fab-wrapper.is-open .fab-action.action-1 {
    bottom: 80px;
    transition-delay: 0.05s;
}

/* Second item (Whatsapp) goes up 130px */
.fab-wrapper.is-open .fab-action.action-2 {
    bottom: 140px;
    transition-delay: 0.1s;
}

/* Dummy content styling */
.content-placeholder {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
