/* Google Font Import */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

:root {
    --primary-purple: #5949e7;
    --primary-red: #e23939;
    --primary-green: #48c9b0; /* New Color */
    --text-dark: #333;
    --text-light: #6c757d;
    --light-gray-bg: #f0f0f0;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--text-dark);
    background-color: #fff;
}

.reveal-on-scroll {
    visibility: hidden;
}

/* ==========================================================
   HANGING TOP INFO BANNER
========================================================== */
#top-info-banner {
    background-color: var(
        --primary-purple
    ); /* A light grey, change as needed */
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--primary-purple);
    text-align: center;
    font-size: 0.9rem;
    color: var(--light-gray-bg);
    /* The transition is the key to the smooth animation */
    transition: transform 0.3s ease-in-out;
    transform: translateY(0); /* Default state: visible */
}

/* This class will be added by JavaScript to hide the banner */
#top-info-banner.hide-banner {
    transform: translateY(-100%); /* Slides the banner up and out of view */
}

#top-info-banner .container {
    /* Make the desktop banner stack vertically on small screens if needed */
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem; /* Add some spacing */
}
/* Header & Navigation */
.navbar-brand img {
    max-height: 40px;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0.5rem;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: var(--primary-purple);
}

.cart-icon-container {
    position: relative;
    /* color: var(--text-dark); */
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-custom {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.btn-primary-custom:hover {
    background-color: #092345;
    border-color: #092345;
    color: #fff;
}

/* Section Titles */
.section-title {
    font-weight: 700;
    color: var(--text-dark);
}

/* Hero Section */
.hero-card {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    border: none;
    color: white;
    display: flex;
    /* flex-direction: column; */
    justify-content: center;
    align-items: end;
    padding: 2rem;
}

.card-overlay {
    position: relative;
    overflow: hidden;
}

.card-overlay::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0) 60%
    );
    border-radius: 12px;
}

.card-overlay .card-body {
    position: relative;
    z-index: 2;
    padding: 0;
}

.hero-card h1,
.hero-card h2 {
    font-weight: 700;
}
.hero-card h5 {
    font-weight: 400;
    color: #f8f9fa;
}
.hero-card h1 {
    font-size: 2.5rem;
}
.hero-card h2 {
    font-size: 1.75rem;
}

/* ==========================================================
   NEW RESPONSIVE HEADER & HERO STYLES
========================================================== */

/* --- Main Navbar Styling --- */
#main-navbar {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    transition: transform 0.3s ease-in-out;
}
#main-navbar .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
#main-navbar .navbar-toggler {
    border: none;
}
#main-navbar .navbar-toggler:focus {
    box-shadow: none;
}

/* --- Mobile Collapsible Menu --- */
.mobile-nav-menu {
    background-color: #f8f9fa;
}
.mobile-nav-menu ul li a {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}
.mobile-nav-menu ul li a:hover {
    background-color: #e9ecef;
}

/* --- Hero Section Adjustments --- */
.hero-section {
    padding-top: 0.5rem; /* Add padding to the top */
    padding-bottom: 0;
    justify-self: center;
}
.large-card {
    min-height: 35vh; /* Adjust height based on viewport */
}
/* .small-card {
    min-height: 200px;
    width: 40%;
} */
.hero-sub-cards {
    margin-top: 0.025rem !important;
}
.hero-sub-cards .col-md-6 {
    width: 50%;
    /* margin-top: 0; */
}
/* =============================================
   MEDIA QUERY FOR DESKTOP (LG screens and up)
============================================= */
@media (min-width: 992px) {
    /* --- Banner Behavior --- */
    #top-info-banner.hide-banner {
        transform: translateY(-100%);
    }
    #main-navbar.scrolled {
        /* This class is added by JS */
        transform: translateY(calc(-1 * var(--banner-height)));
    }

    /* --- Navbar Layout on Desktop --- */
    #main-navbar .navbar-brand {
        position: static;
        transform: none;
        margin-right: auto;
    }
    #main-navbar .navbar-toggler,
    #navbarNav {
        display: none !important; /* Hide mobile toggler and menu */
    }
    #desktopNav {
        display: flex !important; /* Show desktop menu */
    }

    /* --- Hero Layout on Desktop --- */
    .hero-section {
        display: grid;
        margin: 0 2.5rem;
        /* Give the first column (large banner) ~60% and the second ~40% */
        grid-template-columns: 1.5fr 1fr;
        grid-template-rows: auto auto;
        gap: 1.5rem; /* A slightly larger gap can also look better */
        padding-top: 1.5rem; /* Add padding to the top */
        padding-bottom: 0.5rem;
    }
    .hero-section .container {
        display: contents; /* The container becomes part of the grid */
    }
    .large-card {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
        min-height: 450px;
    }
    .small-card {
        width: 100%;
    }
    .hero-sub-cards {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        display: flex;
        flex-direction: column;
        /* Reset mobile margin */
        margin-top: 0 !important;
    }
    .hero-sub-cards .col-md-6 {
        flex: 1;
        width: 100%;
    }
    .hero-sub-cards .col-md-6.sub-1 {
        margin-top: 0 !important;
    }
}
/* Features Section & Product Cards */
/* --- PRODUCT CARD RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 767.98px) {
    .product-card {
        padding: 0 !important; /* Reduce padding on mobile */
    }
    .product-info {
        width: 60%;
    }
    .product-info h5 {
        font-size: 0.75rem !important; /* Smaller title */
        margin-bottom: 0.1rem;
    }
    .product-info p {
        font-size: 0.8rem; /* Smaller description */
    }
    .product-price {
        width: 40%;
        font-size: 0.75rem !important; /* Smaller price */
    }
    /* Hide the 'VIEW' button on mobile for a cleaner look, as the whole card is clickable */
    .product-image .btn-view {
        display: none;
    }

    section.py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .create-card h5,
    .catalog-header h2,
    .catalog-header button,
    .download-link,
    .btn-add-to-cart,
    .checkout-page h4,
    .login-page p {
        font-size: 0.75rem !important;
    }
    .create-card h2 {
        font-size: 1rem !important;
    }
    .catalog-header button {
        padding: 0.25rem 0.5rem;
        background-color: #fff;
        color: var(--text-dark);
        border-color: #fff;
    }
    .download-link {
        padding: 0.25rem 0.5rem;
    }
    .product-details-page h1.page-title {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }
    .main-product-image {
        min-height: 350px !important;
    }
    .product-details-page,
    .cart-page,
    .checkout-page {
        padding-top: 0.5rem;
    }
    .product-info-section .product-name {
        font-size: 1.25rem !important;
        margin-top: 1rem;
    }
    .main-product-image {
        margin-bottom: 0.5rem !important;
    }
    .product-thumbnail-item {
        height: 75px !important;
    }
    .btn-proceed {
        margin-left: auto;
        /* font-size: 0.75rem !important; */
    }
    .auth-form-container {
        padding: 1.5rem 1rem 1rem !important;
    }
    .hero-section .container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* =========================================================================
   NEW CATALOG PAGE LAYOUT
========================================================================= */

/* --- Mobile Offcanvas --- */
/* ==========================================================
   NEW RESPONSIVE CATALOG PAGE STYLES
========================================================== */

/* --- Mobile Offcanvas Styling --- */
.offcanvas {
    /* Use the same purple as your old sidebar for consistency */
    background-color: var(--primary-purple);
    color: #fff;
}
.offcanvas .offcanvas-title {
    font-weight: 700;
}
.offcanvas .form-control {
    border-radius: 8px;
}
.offcanvas .btn-close {
    filter: invert(1) grayscale(100) brightness(200%);
} /* Make it white */

/* --- Desktop Fixed Sidebar --- */
.filter-sidebar-desktop {
    position: sticky; /* The magic property */
     top: 75px;  
     scrollbar-width: none;
    /* Adjust this value to be the height of your sticky navbar + a little space */
     height: calc(100vh - 120px);  
    /* Full viewport height minus the top offset */
    /*height: 100%;*/
     overflow-y: auto;  
    /* Add a scrollbar if the content is too long */
    padding: 1.5rem;
    background-color: var(--primary-purple);
    color: #fff;
    border-radius: 12px;
}

/* --- Main Content Area --- */
.main-content {
    padding-top: 0.5rem;
    padding-bottom: 0;
}
.catalog-product-section {
    justify-items: center;
}

.container-fluid.catalog-product-section,
.catalog-product-section .container {
    padding: 0;
}

/* Make the product grid responsive */
/* On extra small screens, it will be 2 columns. On medium and up, 3 columns */
@media (min-width: 768px) {
    .main-content .row-cols-md-3 > * {
        flex: 0 0 auto;
        width: 33.33333333%;
    }
}
/* --- PRODUCT CARD UPDATE --- */
.product-card {
    /*background-color: #f8f9fa;*/
    border-radius: 12px;
    /* padding: 1rem; */
    height: 100%;
}
.product-image {
    position: relative; /* Needed for the View button */
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 8px;
    overflow: hidden; /* Ensures button stays within rounded corners */
}
.product-image img {
    max-width: 100%;
    transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* View Button on Hover */
.product-image .btn-view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(89, 73, 231, 0.9); /* primary-purple with alpha */
    color: #fff;
    border: 2px solid #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.product-card:hover .btn-view {
    opacity: 1;
    visibility: visible;
}

/* Badges, Info, Price (from catalog) */
.badge-sale,
.badge-hot {
    position: absolute;
    top: 8px;
    left: 8px;
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    font-weight: 500;
    z-index: 2;
}
.badge-sale {
    background-color: var(--primary-purple);
}
.badge-hot {
    background-color: var(--primary-red);
}
.product-info h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}
.product-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}
.product-price {
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-red);
}
.product-price span {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
}

/* --- PRODUCT DETAILS PAGE STYLES --- */
.product-details-page h1.page-title {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}
.custom-design-link {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-dark);
}
.custom-design-link:hover {
    color: var(--primary-purple);
}

/* Image Gallery */

.product-thumbnails {
    display: flex;
    gap: 1rem;
}
.product-thumbnail-item {
    flex: 1;
    background-color: var(--primary-red);
    height: 120px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    transition: border-color 0.2s ease;
    min-width: 0;
}
.product-thumbnail-item.active,
.product-thumbnail-item:hover {
    border-color: var(--primary-purple);
}
.design-preview-note {
    color: var(--primary-purple);
    font-style: italic;
    font-size: 0.9rem;
}

/* Product Info Section */
.product-info-section .product-name {
    font-weight: 700;
    font-size: 2rem;
}
.product-info-section .product-description {
    font-size: 1rem;
    color: var(--text-light);
}

.product-spec-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.product-spec-item label {
    font-weight: 700;
    font-size: 1.25rem;
    width: 100%;
    flex-shrink: 0;
}
.product-spec-item .spec-value {
    background-color: var(--light-gray-bg);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    flex-grow: 1;
    position: relative; /* For pseudo-element arrow */
}

/* Size Chart Button */
.size-chart-button {
    display: block;
    width: 100%;
    background-color: var(--primary-purple);
    color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.size-chart-button:hover {
    background-color: #092345;
    color: #fff;
}

/* Size & Quantity Section */
.size-quantity-section h5 {
    font-weight: 700;
    font-size: 1.25rem;
}
.size-quantity-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}
.size-quantity-row .form-label {
    font-weight: 500;
}
.size-quantity-row .form-select,
.size-quantity-row .quantity-input {
    background-color: var(--light-gray-bg);
    border: none;
    border-radius: 8px;
}
.add-more-size-btn {
    background-color: var(--light-gray-bg);
    border: none;
    color: var(--text-dark);
    font-weight: 500;
}
.add-more-size-btn:hover {
    background-color: #e0e0e0;
}
.btn-remove-size {
    color: var(--primary-red);
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

/* Action Buttons */
.btn-add-to-cart {
    background-color: #fff;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}
.btn-add-to-cart:hover {
    background-color: var(--text-dark);
    color: #fff;
}
.btn-proceed {
    background-color: var(--primary-green);
    border: 2px solid var(--primary-green);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}
.btn-proceed:hover {
    background-color: #40bba0;
    border-color: #40bba0;
    color: #fff;
}

.carousel-controls a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.2rem;
}

/* Categories Section (Home Page) */
.more-link {
    text-decoration: none;
    font-weight: 500;
    color: var(--primary-purple);
}
.categories-box {
    background-color: var(--primary-red);
    border-radius: 12px;
    padding: 1rem;
}
.categories-box .list-group-item {
    background-color: transparent;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.categories-box .list-group-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Create Design Section */
.create-card {
    min-height: 250px;
    border-radius: 12px;
    color: white;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    /* padding: 2rem; */
}
.create-card h2 {
    font-weight: 700;
}
.create-card h5 {
    color: #f8f9fa;
}

/* Testimonials Section */
.testimonial-card {
    min-height: 350px;
    border-radius: 12px;
    color: white;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    text-align: center;
    padding: 2rem;
}
.testimonial-card .card-body {
    text-align: center;
}
.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
}
.testimonial-card h5 {
    font-weight: 700;
    margin-top: 1rem;
}

#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: auto;
    opacity: 1;
}
#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 1.5rem;
    background-size: 50%;
}
/* .carousel-indicators-custom {
    text-align: center;
    margin-top: 1.5rem;
}
.carousel-indicators-custom button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d1d1d1;
    border: none;
    margin: 0 5px;
}

.carousel-indicators-custom button.active {
    background-color: var(--primary-purple);
} */

.carousel-indicators {
    position: relative; /* Override Bootstrap's 'absolute' */
    bottom: auto; /* Remove default positioning */
    left: auto;
    right: auto;
    margin-top: 1.5rem; /* Add our custom margin */
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
}

/* These are our custom styles for the buttons themselves */
.carousel-indicators button {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50%;
    background-color: #d1d1d1;
    border: none;
    margin: 0 5px;
    /* These are needed to override Bootstrap's defaults */
    opacity: 1;
    text-indent: -999px; /* Hides the button text */
}

/* .carousel-indicators button.active {
    background-color: var(--primary-purple);
} */
.carousel-indicators [data-bs-target] {
    background-color: var(--primary-purple);
}
/* Footer */
footer {
    border-top: 1px solid #e9ecef;
}
.footer-title {
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-text {
    color: var(--text-light);
    font-size: 0.9rem;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: var(--primary-purple);
}
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: var(--text-dark);
    text-decoration: none;
    margin-right: 0.5rem;
}
.social-icon:hover {
    background-color: var(--primary-purple);
    color: #fff;
}
footer .form-control {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
footer .btn-primary-custom {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}
.text-primary-purple {
    color: var(--primary-purple) !important;
}

/* Custom Modal Styling */
.modal-header {
    background-color: var(--primary-purple);
    color: #fff;
}

.modal-header .btn-close {
    /* This filter makes the default black 'X' button white */
    filter: invert(1) grayscale(100) brightness(200%);
}

/* --- CUSTOM DESIGN PAGE STYLES --- */
.custom-design-page .form-select-lg {
    background-color: var(--light-gray-bg);
    border: none;
    font-weight: 500;
}

/* ========================================================================= */
/*  PRODUCT DETAILS PAGE
/* ========================================================================= */
.product-details-page .page-title {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}
.main-product-image {
    background-color: #f0f2f5;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    min-height: 500px;
}
.main-product-image .preview-image {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
}
.main-product-image .preview-image.active {
    display: block;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.product-thumbnail-item {
    background-color: #f8f9fa;
    border: 3px solid #dee2e6;
    height: 120px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-dark);
    font-weight: 600;
    transition: all 0.2s ease;
}
.product-thumbnail-item img {
    max-height: 70%;
    margin-bottom: 5px;
    max-width: 100%;
    height: auto;
}
.product-thumbnail-item.active,
.product-thumbnail-item:hover {
    border-color: var(--primary-purple);
    background-color: #f3e5f5;
}
.design-preview-note {
    color: var(--primary-purple);
    font-style: italic;
    font-size: 0.9rem;
}

.product-info-section .product-description {
    font-size: 1rem;
    color: var(--text-light);
}
.product-spec-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.product-spec-item label,
.form-section-title {
    font-weight: 600;
    font-size: 1.1rem;
}
.product-spec-item .form-select,
.product-spec-item .form-control {
    background-color: #f0f2f5;
    border: none;
}
.file-upload-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f2f5;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
}
.size-quantity-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 1rem;
    align-items: center;
}
.size-quantity-row .form-select,
.size-quantity-row .form-control {
    background-color: #f0f2f5;
}
.uploaded-design-files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}
.uploaded-file-pill {
    background-color: var(--primary-purple);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-remove-file {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    padding: 0;
}
.price-calculation-display {
    text-align: right;
    margin: 2rem 0;
}
.price-calculation-display span {
    font-size: 1.2rem;
    color: var(--text-light);
}
.price-calculation-display h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
}

.btn-add-to-cart {
    background-color: #fff;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}
.btn-proceed {
    background-color: var(--primary-green);
    border: 2px solid var(--primary-green);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

/* ========================================================================= */
/*  PRODUCT DETAILS - LIVE PREVIEW STYLES
/* ========================================================================= */

/* Container for the preview placeholders */
.preview-placeholder-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* Hidden by default */
}
.preview-placeholder-container.active {
    display: block; /* Shown by JS when its view is active */
}

/* Individual placeholder styling */
.preview-placeholder {
    position: absolute;
    border: 2px dashed #999;
    background-color: rgba(255, 255, 255, 0.4);
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    overflow: hidden;
}

/* When a placeholder is filled with an image or text */
.preview-placeholder.filled {
    border: none;
    background-color: transparent;
    padding: 0;
}
.preview-placeholder.has-text {
    color: #000;
    font-weight: bold;
    font-size: 1.5rem; /* Make text bigger */
    border: none;
    background: none;
}
.preview-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents image stretching */
}

/* --- Placeholder Positions --- */

/* Front View Placeholders */
#placeholder-front-logo {
    top: 18%;
    left: 60%;
    width: 15%;
    height: 15%;
}
#placeholder-front-brand {
    top: 18%;
    left: 25%;
    width: 15%;
    height: 15%;
}
#placeholder-front-artwork {
    top: 35%;
    left: 30%;
    width: 40%;
    height: 40%;
}
#placeholder-front-text {
    top: 78%;
    left: 30%;
    width: 40%;
    height: 10%;
}

/* Back View Placeholders */
#placeholder-back-artwork {
    top: 25%;
    left: 30%;
    width: 40%;
    height: 45%;
}
#placeholder-back-text {
    top: 72%;
    left: 30%;
    width: 40%;
    height: 10%;
}

/* Sleeve Placeholders */
#placeholder-left-sleeve {
    top: 35%;
    left: 40%;
    width: 25%;
    height: 25%;
}
#placeholder-right-sleeve {
    top: 35%;
    left: 35%;
    width: 25%;
    height: 25%;
}

/* --- CART PAGE STYLES --- */
.cart-page .section-title {
    font-size: 2.5rem;
}
.cart-header {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr 1.5fr 1fr 0.5fr;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: var(--text-light);
    text-align: left;
}
.cart-item {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr 1.5fr 1fr 0.5fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}
.product-image-placeholder {
    background-color: var(--primary-red);
    color: white;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 500;
}
.cart-item-details .product-name {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
.cart-item-details .product-type {
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.cart-item-details .product-specs {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}
.cart-item-price {
    font-weight: 500;
    text-align: right;
}
.cart-item-subtotal {
    font-weight: 700;
    font-size: 1.25rem;
    text-align: right;
}

.cart-item-quantity .input-group {
    flex-wrap: nowrap;
}
.cart-item-quantity .form-control {
    background-color: var(--light-gray-bg);
    border: none;
    text-align: center;
    flex-grow: 0;
    width: 60px;
    border-radius: 8px 0 0 8px !important;
}
.cart-item-quantity .btn-edit {
    background-color: var(--primary-purple);
    color: white;
    font-weight: 500;
    border: none;
    border-radius: 0 8px 8px 0 !important;
}
.cart-item-remove .btn-remove-item {
    background: none;
    border: none;
    color: var(--primary-red);
    font-size: 1.5rem;
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 2rem;
}
.cart-summary {
    width: 100%;
    max-width: 400px;
    font-size: 1.1rem;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}
.summary-row.grand-total {
    font-weight: 700;
    font-size: 1.5rem;
    border-top: 2px solid var(--text-dark);
    margin-top: 0.5rem;
    padding-top: 1rem;
}
.cart-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}
.btn-continue-shopping {
    background-color: #fff;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
}
.btn-continue-shopping:hover {
    background-color: var(--text-dark);
    color: #fff;
}
@media (max-width: 767.98px) {
    .cart-header {
        display: none;
    }
    .cart-item {
        grid-template-columns: 100px 1fr;
    }
    .cart-item-details {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    .cart-item-price,
    .cart-item-quantity,
    .cart-item-subtotal,
    .cart-item-remove {
        grid-column: 2 / 3;
        text-align: left;
    }
    .cart-item-price::before,
    .cart-item-subtotal::before {
        font-weight: 600;
        color: var(--text-light);
        margin-right: 0.5rem;
    }
    .cart-item-price::before {
        content: "Price:";
    }
    .cart-item-subtotal::before {
        content: "Subtotal:";
    }
}
/* --- CART PAGE: QUANTITY EDIT UPDATE --- */
.cart-item-quantity .quantity-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto;
}
.cart-item-quantity .quantity-display {
    background-color: var(--light-gray-bg);
    padding: 0.5rem 1rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}
.cart-item-quantity .btn-edit {
    border-radius: 0; /* Override default button radius */
}

/* Modal Styles */
.modal-quantity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}
.modal-quantity-row:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}
.modal-quantity-row label {
    font-weight: 600;
}
.modal-quantity-row .form-control {
    width: 80px;
    text-align: center;
}

@media (max-width: 767.98px) {
    .cart-item-quantity .quantity-group {
        margin: 0;
    }
}

/* --- CHECKOUT PAGE STYLES --- */
.checkout-page .form-control-lg,
.checkout-page .form-select-lg {
    border: 1px solid #ced4da;
    border-radius: 8px;
}
.payment-method-options .payment-option {
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}
.payment-method-options .form-check-input {
    float: none;
    margin-right: 0.75rem;
    margin-left: auto;
}
.payment-method-options .form-check-label {
    font-weight: 500;
}
.payment-gateways {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.payment-gateways img {
    height: 24px;
}

/* Order Summary Box */

.order-summary .summary-title {
    font-weight: 700;
}
.summary-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 0.9rem;
}
.summary-item .item-name {
    font-weight: 600;
    margin: 0;
}
.summary-item .item-spec {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}
.summary-item .item-quantity,
.summary-item .item-subtotal {
    font-weight: 500;
}
.summary-costs {
    /* padding: 1rem 0; */
    /* margin: 1rem 0; */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.cost-row.estimated-total {
    font-weight: 700;
    color: var(--text-dark); /* Light red for contrast on purple */
}
.summary-payment {
    padding-bottom: 1rem;
}
.cost-row.amount-payable {
    font-weight: 700;
    font-size: 1.25rem;
}
.summary-note {
    font-size: 0.8rem;
    opacity: 0.8;
    text-align: center;
    margin-top: 1rem;
}
.ask-quotation-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
}
.ask-quotation-link:hover {
    color: var(--primary-purple);
}
/* --- CHECKOUT PAGE: LOGGED-IN STYLES --- */
#shipping-fieldset:disabled .form-control,
#shipping-fieldset:disabled .form-select {
    background-color: #e9ecef; /* Bootstrap's disabled color */
    opacity: 1;
}

/* Address Selection Modal Styles */
.address-list-modal .address-item {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.address-list-modal .address-item:hover {
    background-color: #f8f9fa;
}
.address-list-modal .address-item.selected {
    border-color: var(--primary-purple);
    background-color: #f3e5f5; /* Light purple */
}
.address-list-modal .address-item .form-check {
    pointer-events: none; /* Make the whole div clickable, not just the radio */
}
.address-list-modal .address-item .form-check-label {
    display: flex;
    flex-direction: column;
}
.address-list-modal .address-item .address-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.address-list-modal .address-item .address-details {
    color: var(--text-light);
    font-size: 0.9rem;
}
/* ========================================================================= */
/*  LOGIN & REGISTER PAGE (TABBED STYLE)
/* ========================================================================= */
.auth-page-container {
    max-width: 600px;
    margin: auto;
}

.auth-tabs {
    display: flex;
    margin-bottom: -1px; /* Overlap the border of the container below */
}

.auth-tab-button {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 1px solid #ddd;
    background-color: #fff;
    text-align: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.auth-form-container {
    padding: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 0 0 12px 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.auth-form-container .form-control {
    height: 50px;
}

/* Hide inactive form blocks */
.auth-form-block {
    display: none;
}
.auth-form-block.active {
    display: block;
}

/* --- Agent Styles --- */
.auth-tab-button.agent-tab {
    color: var(--primary-red);
    border-top-left-radius: 12px;
}
.auth-tab-button.agent-tab.active {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: #fff;
}
.auth-form-container.agent-active {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

/* --- Buyer Styles --- */
.auth-tab-button.buyer-tab {
    color: var(--primary-purple);
    border-top-right-radius: 12px;
}
.auth-tab-button.buyer-tab.active {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    color: #fff;
}
.auth-form-container.buyer-active {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
}

/* Shared styles for active container */
.auth-form-container.agent-active label,
.auth-form-container.agent-active .forgot-password,
.auth-form-container.agent-active .panel-footer-note,
.auth-form-container.agent-active .panel-footer-note a,
.auth-form-container.buyer-active label,
.auth-form-container.buyer-active .forgot-password,
.auth-form-container.buyer-active .panel-footer-note,
.auth-form-container.buyer-active .panel-footer-note a {
    color: #fff;
}

.auth-form-container.agent-active .btn-panel-login {
    background-color: #fff;
    color: var(--primary-red);
    border: 2px solid #fff;
}
.auth-form-container.buyer-active .btn-panel-login {
    background-color: var(--primary-red);
    color: #fff;
    border: 2px solid var(--primary-red);
}
/* --- End of New Styles --- */
/* ========================================================================= */
/*  CATALOG PAGE
/* ========================================================================= */
.filter-sidebar {
    background-color: var(--primary-purple);
    color: #fff;
    padding: 2rem;
    border-radius: 0 12px 0 0;
    height: 100%;
}
.filter-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #fff;
}
.filter-sidebar .input-group .form-control {
    border-radius: 8px 0 0 8px;
    border: none;
}
.filter-sidebar .input-group .btn {
    background-color: #fff;
    color: var(--primary-purple);
    border-radius: 0 8px 8px 0;
}
.filter-list-checkboxes .form-check {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}
.filter-sidebar .form-check-input {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}
.filter-sidebar .form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}
.filter-sidebar .form-check-label {
    padding-left: 0.5rem;
    font-weight: 500;
}
.filter-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}
.price-range-slider {
    margin: 1.5rem 0;
}
#price-slider .noUi-target {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: none;
    box-shadow: none;
}
#price-slider .noUi-connect {
    background: var(--primary-red);
}
#price-slider .noUi-handle {
    border: 3px solid var(--primary-red);
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
    cursor: grab;
}
.noUi-horizontal {
    height: 6px;
}
.noUi-horizontal .noUi-handle {
    width: 20px;
    height: 20px;
    right: -10px;
    top: -7px;
}
.noUi-handle:after,
.noUi-handle:before {
    display: none;
}
.price-range-values {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #fff;
}
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
}
.btn-apply-filter {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 8px;
}
.btn-apply-filter:hover {
    background-color: #860e0e;
}
.reset-link {
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
}
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.download-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

/* Styles for Filter & Sort Dropdowns */
.filter-toggle-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    width: 100%;
    background: none;
    border: none;
}
.filter-toggle-btn .fas {
    transition: transform 0.3s ease;
}
.filter-toggle-btn[aria-expanded="true"] .fas {
    transform: rotate(90deg);
}
.filter-collapse-list {
    padding-left: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Styles for Custom Tags as Checkboxes */
.tag-list .form-check {
    display: inline-block;
    /* margin-right: 0.5rem; */
    margin-bottom: 0.5rem;
    padding-left: 0;
}
.tag-list .form-check-input {
    display: none; /* Hide the actual checkbox */
    margin-bottom: 0.5rem;
}
.tag-list .tag-label {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.tag-list .form-check-input:checked + .tag-label {
    background-color: #fff;
    color: var(--primary-purple);
    border-color: var(--primary-purple);
}
/* ========================================================================= */
/*  CUSTOM PAGINATION STYLES
/* ========================================================================= */

.pagination {
    --bs-pagination-focus-box-shadow: none; /* Removes the blue glow on click */
    --bs-pagination-font-size: 1.1rem;
    --bs-pagination-border-width: 0;
}

.pagination .page-item .page-link {
    /* Base style for all links */
    border: none;
    background-color: transparent;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0 0.25rem;
    border-radius: 50%; /* Makes all items circular */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination .page-item:not(.disabled) .page-link:hover {
    /* Hover effect for non-disabled, non-active items */
    background-color: #f0e6ff; /* A very light purple */
}

/* Style for the ACTIVE page number */
.pagination .page-item.active .page-link {
    background-color: var(--primary-purple);
    color: #fff;
}

/* Style for the PREV/NEXT buttons */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    background-color: #f0f0f0;
}
.pagination .page-item:first-child .page-link:hover,
.pagination .page-item:last-child .page-link:hover {
    background-color: #e0e0e0;
}

/* Style for the DISABLED state (ellipsis '...' and arrows) */
.pagination .page-item.disabled .page-link {
    background-color: transparent;
    color: var(--text-light);
}

/* Specifically remove the circular background from the ellipsis (...) */
.pagination .page-item.disabled span.page-link[aria-disabled="true"] {
    background-color: transparent;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero-card h1 {
        font-size: 2rem;
    }
    .hero-card h2 {
        font-size: 1.5rem;
    }
    .product-card {
        flex-direction: column;
        text-align: center;
    }
    .product-price {
        margin-left: 0;
        text-align: center;
    }
}
@media (max-width: 767.98px) {
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    .product-card {
        flex-direction: row;
        text-align: left;
    }
    .product-price {
        margin-left: auto;
        text-align: right;
    }
}

/* ========================================================================= */
/*  CHECKOUT PAGE
/* ========================================================================= */
.order-summary {
    /* background-color: var(--primary-purple);
    color: white; */
    padding: 1.5rem;
    /* border-radius: 12px; */
}
.summary-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.summary-item .item-image {
    width: 60px;
    height: 60px;
    background-color: #f0f2f5;
    border-radius: 8px;
}
.summary-item .item-details {
    flex-grow: 1;
}
.item-details .item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.item-details .item-spec {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}
.summary-item .item-quantity,
.summary-item .item-subtotal {
    font-weight: 500;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    /* margin-bottom: 0.5rem; */
}

.payment-method-options .payment-option {
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    cursor: pointer;
}
.payment-method-options .payment-option.active {
    border-color: var(--primary-purple);
    background-color: #f3e5f5;
}
