/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #F8F8F8;
    color: #333333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 300;
}
html {
    scroll-behavior: smooth;
}

/* Define CSS variables for consistency */
:root {
    --color-accent-sale: limegreen;
    --color-text-light: white;
    --color-text-dark: #333333;
}

/* Animations */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Custom Styles */
.scrolling-ribbon-container {
    overflow: hidden;
    position: relative;
}
.scrolling-ribbon {
    display: flex;
    width: 400%;
    animation: scroll-left 25s linear infinite;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://res.cloudinary.com/dufr307py/image/upload/v1763302360/review_ylur2v_zzvjbk.webp') no-repeat center center/cover;
}

.review-card {
    min-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: center;
}
@media (min-width: 768px) {
     .review-card {
        min-width: 50%;
    }
}
@media (min-width: 1024px) {
     .review-card {
        min-width: 33.333%;
    }
}

.product-section-container {
    /* --- This class controls the space between the products and the browser edges --- */
    /* Adjust this padding to change the side-margins for the product grid */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (min-width: 768px) {
    .product-section-container {
        padding-left: 2rem; /* Adjusted this value for desktop screens */
        padding-right: 2rem; /* Adjusted this value for desktop screens */
    }
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* --- This property controls the space *between* the products --- */
    /* Change the value (e.g., to 1rem or 3rem) to adjust the gap */
    gap: 0.5rem; 
}
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)); /* Adjusted to 4 columns for desktop */
    }
}
.product-card {
    display: flex;
    flex-direction: column;
}
.product-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.product-image-interactive {
    position: relative;
    padding: 0;
}
.sale-badge {
    background-color: var(--color-accent-sale);
    color: var(--color-text-light);
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.6rem;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
}
.action-icons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.action-icons button {
    background-color: white;
    border-radius: 9999px;
    padding: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: background-color 0.3s;
}
.action-icons button:hover {
    background-color: #f3f4f6;
}
.product-name-multiline {
    height: 3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.size-tag {
    border: 1px solid #d1d5db;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}
.size-tag:hover {
    background-color: #e5e7eb;
}
.size-tag.selected {
    background-color: #000;
    color: #fff;
    border-color: #000;
}
.dotted-underline {
    text-decoration: none;
    border-bottom: 1px dotted var(--color-text-dark);
    color: black;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.review-description-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-count-badge {
    background-color: #000;
    color: #fff;
    font-size: 0.65rem; /* Smaller font size for the count */
    font-weight: 600;
    line-height: 1;
    border-radius: 50%; /* Ensures a perfect circle */
    position: absolute; /* Position relative to the parent icon */
    top: -0.4rem;
    right: -0.4rem;
    width: 1.1rem; /* Fixed width and height for a perfect circle */
    height: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
/* Side Cart Styles */
.cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 90%;
    max-width: 450px;
    background-color: white;
    z-index: 100;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-side-panel.open {
    transform: translateX(0);
}
.is-open .cart-side-panel {
    transform: translateX(0);
}

.is-open .cart-backdrop {
    opacity: 1;
    visibility: visible;
}

/* For Message Box UI */
.message-box-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 110;
    display: none;
    align-items: center;
    justify-content: center;
}
.message-box {
    background-color: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.category-button {
    @apply px-4 py-2 rounded-full border border-gray-300 transition-colors duration-200;
}
.category-button.active {
    @apply bg-black text-white border-black;
}
