/*====================================================================
    CSS Variable Definitions & Global Styles
=====================================================================*/
:root {
    --primary-color: #ff527b;
    --secondary-color: #f7f7f7;
    --text-color: #333;
    --light-grey: #e9ecef;
    --footer-bg: #eaf1f9;
    --link-color: #555;
    --highlight-color: #ff527b;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: #fff;
    padding-bottom: 60px;
    /* Space for the fixed bottom navigation */
}

/*====================================================================
    Header Styles
=====================================================================*/
.header-top {
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-grey);
}

.header-location {
    font-size: 1rem;
    color: #444;
}

.header-location strong {
    color: var(--primary-color);
}

.header-message {
    color: #777;
    font-size: 0.9rem;
}

/* Main Navbar */
.navbar {
    background-color: #fff;
    box-shadow: none;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.header-logo {
    height: 50px;
    width: auto;
}

.search-box {
    position: relative;
    width: 100%;
    /* Full width on small screens */
    margin-right: 0;
    margin-top: 1rem;
}

.search-box .form-control {
    border-radius: 50px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background-color: var(--secondary-color);
    border: none;
}

.search-box .form-control::placeholder {
    color: #999;
    font-size: 1rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 10;
}

.nav-icons-right .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.75rem;
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.nav-icons-right .nav-link i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #777;
}

.nav-icons-right .nav-link:hover {
    color: var(--primary-color);
}

.nav-icons-right .nav-link:hover i {
    color: var(--primary-color);
}

/* Desktop Header Styles */
@media (min-width: 992px) {
    .search-box {
        flex-grow: 1;
        max-width: 600px;
        margin-top: 0;
        margin-right: 1rem;
    }
    .header-top {
        display: block;
    }
    .nav-icons-right .nav-link {
        display: flex !important;
    }
}

/* Tablet Header Styles */
@media (max-width: 991px) {
    .navbar .container-fluid {
        flex-wrap: wrap;
    }
    .navbar-toggler {
        order: 1;
    }
    .navbar-brand {
        order: 2;
        margin-right: auto;
    }
    .nav-icons-right {
        order: 3;
    }
    .search-box {
        order: 4;
        margin-top: 1rem;
    }
}

/*====================================================================
    Navigation & Hero Sections
=====================================================================*/
/* Sub-Header for categories */
.sub-header-nav {
    background-color: #fff;
    border-bottom: 1px solid var(--light-grey);
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.sub-header-nav::-webkit-scrollbar {
    display: none;
}

.sub-header-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: inline-block;
    transition: color 0.2s;
}

.sub-header-nav a:hover {
    color: var(--primary-color);
}

/* Hero Banner Slider Styles */
.hero-banner-slider {
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    padding: 3rem 0;
}

.hero-slide-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hero-slide-container::-webkit-scrollbar {
    display: none;
}

.hero-slide-item {
    flex: 0 0 auto;
    margin-right: 1rem;
}

/* Responsive Hero Slider Item Widths */
@media (max-width: 767px) {
    .hero-slide-item {
        width: 100%;
        margin-right: 10px;
        /* spacing between banners */
    }
    .hero-slide-container {
        padding-left: 10px;
        /* extra left padding */
    }
    .hero-slide-container::after {
        content: "";
        flex: 0 0 10px;
        /* right side spacing */
    }
}


@media (min-width: 768px) and (max-width: 991px) {
    .hero-slide-item {
        width: calc(100% / 1.5 - 1rem);
    }
}

@media (min-width: 992px) {
    .hero-slide-container {
        scroll-snap-type: x mandatory;
    }
    .hero-slide-item {
        scroll-snap-align: start;
        width: calc(100% / 2.5 - 1rem);
    }
}

.hero-banner-card {
    position: relative;
    background: linear-gradient(90deg, #ffb3b3, #f7669b);
    border-radius: 15px;
    overflow: hidden;
    color: #fff;
    min-height: 250px;
    display: flex;
    align-items: center;
    padding: 2rem;
}

/* Slider Controls */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.slider-control:hover {
    background-color: #fff;
}

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

/* Hide controls on mobile */
@media (max-width: 767px) {
    .slider-control.d-none.d-md-flex {
        display: none !important;
    }
}

/*====================================================================
    Section & Product Styles
=====================================================================*/
.section-heading {
    text-align: center;
    font-weight: bold;
    font-size: 2.25rem;
    margin-bottom: 2rem;
}

.auto-slider-container {
    position: relative;
    overflow: hidden;
}

.auto-slider-wrapper {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.auto-slider-wrapper::-webkit-scrollbar {
    display: none;
}

/* Default to small screen slider behavior */
.auto-slider-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.auto-slider-item {
    flex: 0 0 calc(100% / 2);
    /* Show 2 cards per view on small screens */
    scroll-snap-align: start;
    padding: 0 0.5rem;
}

/* Large screen grid behavior */
@media (min-width: 768px) {
    .auto-slider-wrapper {
        display: flex;
        flex-wrap: wrap;
        overflow: hidden;
        /* Hide scrollbar on large screens */
        scroll-snap-type: none;
        justify-content: space-between;
    }
    .auto-slider-item {
        flex: 0 0 calc(100% / 8 - 1rem);
        /* Show 8 cards per row on large screens */
        max-width: calc(100% / 8 - 1rem);
        padding: 0 0.5rem;
    }
}

/* Fix for inconsistent image sizes */
.category-image-container {
    width: 100%;
    padding-top: 100%;
    /* This creates a 1:1 aspect ratio container */
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.category-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This is the key fix! */
    object-position: center;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image-container img {
    transform: scale(1.05);
}


/* Product Card Styles */
.product-card {
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.product-card-inner {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.product-card-img-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-img-container img {
    transform: scale(1.05);
}

.product-card-body {
    padding: 1rem;
    text-align: center;
}

.product-card-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-card-price {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* "View all" Button Styles */
.view-all-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.3s ease-in-out;
}

.view-all-btn:hover {
    background-color: #e63e64;
    transform: scale(1.05);
}

/* Shop by Occasion section */
.occasion-card {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.occasion-card:hover {
    transform: translateY(-5px);
    color: #fff;
}

/* New Arrivals Section Styles */
.product-slider-wrapper {
    display: flex;
    flex-wrap: nowrap;
    /* Prevent wrapping on small screens */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.product-slider-item {
    flex: 0 0 100%;
    /* Show 1 card per view on small screens */
    margin: 0 0.5rem;
    scroll-snap-align: start;
}

/* Medium & Large screen grid behavior */
@media (min-width: 768px) {
    .product-slider-wrapper {
        flex-wrap: wrap;
        /* Allow wrapping on larger screens */
        overflow-x: hidden;
        /* Hide scrollbar on large screens */
        scroll-snap-type: none;
        justify-content: flex-start;
        padding-bottom: 0;
    }
    .product-slider-item {
        flex: 0 0 calc(33.333% - 1.5rem);
        /* Show 3 cards per row on large screens */
        max-width: calc(33.333% - 1.5rem);
        margin: 0.75rem;
    }
}

/* Specific button style for New Arrivals slider */
.new-arrivals-btn {
    display: block;
    width: fit-content;
    margin: 2rem auto 0;
}

.new-arrivals-btn:hover {
    background-color: #e63e64;
    color: #fff;
    transform: scale(1.05);
    text-decoration: none;
}


/*====================================================================
    Testimonials Section
=====================================================================*/
.testimonial-slider-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 1rem;
}

.testimonial-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.testimonial-slider-item {
    flex: 0 0 100%; /* Show 1 testimonial per view on small screens */
    margin-right: 1.5rem;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .testimonial-slider-wrapper {
        flex-wrap: wrap;
        overflow-x: hidden;
        scroll-snap-type: none;
        justify-content: space-between;
    }
    .testimonial-slider-item {
        flex: 0 0 calc(33.333% - 1rem); /* Show 3 testimonials per row */
        max-width: calc(33.333% - 1rem);
        margin: 0.5rem;
    }
}

.testimonial-heading {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.testimonial-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-card-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
}

.testimonial-card-info h5 {
    font-weight: bold;
    margin-bottom: 0;
}

.testimonial-card-rating i {
    color: gold;
    margin-right: 2px;
}

/*====================================================================
    Footer Styles
=====================================================================*/
.main-footer {
    background-color: var(--footer-bg);
    padding: 4rem 0 1rem;
}

.footer-logo {
    font-weight: bold;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-contact p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-links h5,
.footer-newsletter h5 {
    font-weight: bold;
    margin-bottom: 1.25rem;
}

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

.footer-links ul li a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: var(--highlight-color);
}

.newsletter-form .form-control {
    border-radius: 50px;
    border: 1px solid #ccc;
}

.newsletter-form .btn {
    border-radius: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
}

.footer-bottom {
    border-top: 1px solid #ccc;
    padding-top: 1rem;
    margin-top: 2rem;
}

.payment-icons img {
    height: 25px;
    margin-left: 0.5rem;
}

/*====================================================================
    Bottom Fixed Navigation for Small Devices
=====================================================================*/
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    /* Hidden by default */
}

.bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.7rem;
    padding: 0.5rem 0.25rem;
    transition: color 0.3s;
}

.bottom-nav .nav-link i {
    font-size: 1.25rem;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.bottom-nav .nav-link.active {
    color: var(--primary-color);
}

.bottom-nav .nav-link.active i {
    color: var(--primary-color);
}

/* Show bottom nav only on small devices */
@media (max-width: 767px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
    }
}