/* 🎨 Background & Theme */
body {
    font-family: 'Playfair Display', serif;
    color: #f8f0ff;
    background: linear-gradient(120deg, #16001E 0%, #32004A 100%);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding-top: 90px;
}
#header-container, #footer-container {
    box-shadow: 0 12px 32px -18px #32003a66, 0 -12px 32px -18px #48005588 !important;
    background: rgba(30,8,45,0.96) !important;
    border-radius: 0 0 32px 32px !important;
    margin-bottom: 1.3rem !important;
}
body.loaded {
    opacity: 1;
}
/* 📌 Page Title */
.page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #ee0077 50%, #e10097 100%);
    font-size: 36px;
    font-weight: 800;
    text-transform: capitalize;
    padding: 25px;
    width: 100%;
    text-align: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.page-title.loaded {
    opacity: 1;
}

/* 📦 Products Section */
.products-section {
    margin-top: 10px;
    padding-top: 0;
}

/* 📦 Product Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 🛍️ Product Card */
.product-card {
    background: rgba(255,255,255,0.07);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid #ee0077;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 🖼️ Product Image */
.product-card img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 5px;
}

/* 🏷️ Product Title */
.product-title {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    color: #ffd6fa;
}

/* 💰 Product Price */
.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #e10097;
    margin-bottom: 10px;
}

/* 📖 Product Description */
.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* 🛒 View Product Button */
.product-card a {
    display: block;
    padding: 12px;
    background: linear-gradient(90deg, #ee0077 50%, #e10097 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.product-card a:hover {
    background: linear-gradient(90deg, #e10097 0%, #fa22ba 100%);
}


/* 📑 Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30,8,45,0.96);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 15px auto;
    max-width: 1200px;
    color: #f8f0ff;
}

/* 🔎 Search Bar */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#product-search {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: 0.3s ease;
}

#product-search:focus {
    border-color: #FF4081;
    box-shadow: 0 0 5px rgba(255, 64, 129, 0.3);
}

/* 🎯 Search Button */
#search-button {
    padding: 8px 15px;
    border: none;
    background: #FF4081;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

#search-button:hover {
    background: #C2185B;
}

/* 🛑 Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.pagination button {
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    background: linear-gradient(90deg, #ee0077 50%, #e10097 100%);
    color: #fff;
    border-radius: 5px;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
    transition: 0.3s ease;
}

.pagination button:hover {
    background: linear-gradient(90deg, #e10097 0%, #fa22ba 100%);
}

.pagination button:disabled {
    background: #555;
    cursor: not-allowed;
}

/* 🎬 Image Modal - Fullscreen Overlay */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Dark overlay */
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* 🌟 Modal Content */
.modal-content {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 🖼️ Main Image */
.main-image {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 5px;
    margin-bottom: 15px;
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}

/* 🎯 Thumbnail Container */
.thumbnail-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px;
    width: 100%;
    max-width: 550px;
    scrollbar-width: none; /* Hide scrollbar for cleaner look */
}

/* 🔍 Thumbnails */
.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.2s ease-in-out, border 0.2s;
    border: 2px solid transparent;
    opacity: 0.8;
}

.thumbnail.active {
    border: 2px solid #FF4081;
    opacity: 1;
    transform: scale(1.1);
}

.thumbnail:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* ❌ Close Button */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: #FF4081;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    border: none;
}

.close-modal:hover {
    background: #C2185B;
    transform: scale(1.1);
}

/* ⬅️➡️ Navigation Arrows */
.prev-btn, .next-btn {
    font-size: 22px;
    width: 40px;
    height: 40px;
    padding: 10px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    border-radius: 50%;
    background: rgba(255, 64, 129, 0.8);
    color: white;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

.prev-btn {
    left: -50px;
}

.next-btn {
    right: -50px;
}

.prev-btn:hover, .next-btn:hover {
    background: #C2185B;
}

/* 📱 Mobile Optimization */
@media (max-width: 1000px) {
    .modal-content {
        max-width: 95vw;
        max-height: 65vh;
    }

    .main-image {
        max-height: 50vh;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }

    .prev-btn, .next-btn {
        font-size: 18px;
        padding: 5px;
    }
}
@keyframes flyInRight {
    0% {
      transform: translateX(50px) scale(0);
      opacity: 0;
    }
    80% {
      transform: translateX(0) scale(1.2);
      opacity: 1;
    }
    100% {
      transform: translateX(0) scale(1);
      opacity: 1; /* ✨ Make sure opacity is locked at the end */
    }
  }
  
  .product-rating-stars {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 8px 0;
    color: #FFD700;
    font-size: 1.8rem;
  }
  
  .product-rating-stars .star {
    opacity: 0;
    animation: flyInRight 0.6s ease forwards;
    animation-fill-mode: forwards; /* ✅ This makes the final state stick */
    position: relative;
  }
  
  /* Delay each star a bit */
  .product-rating-stars .star:nth-child(1) {
    animation-delay: 0.5s;
  }
  .product-rating-stars .star:nth-child(2) {
    animation-delay: 0.8s;
  }
  .product-rating-stars .star:nth-child(3) {
    animation-delay: 1.1s;
  }
  .product-rating-stars .star:nth-child(4) {
    animation-delay: 1.4s;
  }
  .product-rating-stars .star:nth-child(5) {
    animation-delay: 1.7s;
  }
  .variant-display {
    margin: 4px 0 8px;
  }
  
  .variant {
    display: inline-block;
    font-size: 13px;
    padding: 2px 6px;
    margin-right: 4px;
    border-radius: 3px;
  }
  
  .variant.in-stock {
    background-color: #e0f8e9;
    color: #1a7f37;
    font-weight: 600;
  }
  
  .variant.out-of-stock {
    background-color: #fce4e4;
    color: #b3261e;
    opacity: 0.7;
  }
  .clearance-ribbon {
    position: absolute;
    top: 30px;
    left: -110px;
    width: 350px;
    background: #c62828;
    color: white;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    padding: 5px 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 5;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30,8,45,0.96);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 15px auto;
    max-width: 1200px;
    color: #f8f0ff;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.search-container,
.per-page-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.per-page-selector label {
    font-weight: 500;
}

/* Input & Select Styling */
#product-search {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#search-button {
    padding: 8px 15px;
    background: #FF4081;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

#products-per-page {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Mobile stacking */
@media (max-width: 600px) {
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container,
    .per-page-selector {
        justify-content: center;
        width: 100%;
    }
}
.image-wrapper {
    position: relative;
}
.promo-card {
    background: white;
    padding: 0;
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid #FF85A2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.promo-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}
@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
#product-search:focus {
    border-color: #ee0077;
    box-shadow: 0 0 5px rgba(238,0,119,0.3);
}

/* 🎯 Search Button */
#search-button {
    padding: 8px 15px;
    border: none;
    background: linear-gradient(90deg, #ee0077 50%, #e10097 100%);
    color: #fff;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

#search-button:hover {
    background: linear-gradient(90deg, #e10097 0%, #fa22ba 100%);
}

/* 🔍 Active Thumbnail */
.thumbnail.active {
    border: 2px solid #ee0077;
}

/* ❌ Close Modal */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(90deg, #ee0077 50%, #e10097 100%);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    border: none;
}

.close-modal:hover {
    background: linear-gradient(90deg, #e10097 0%, #fa22ba 100%);
    transform: scale(1.1);
}

/* ⬅️➡️ Prev/Next Arrows */
.prev-btn, .next-btn {
    font-size: 22px;
    width: 40px;
    height: 40px;
    padding: 10px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    border-radius: 50%;
    background: rgba(225,0,151,0.8);
    color: #fff;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background: #fa22ba;
}

/* 📦 Promo-Card */
.promo-card {
    background: white;
    padding: 0;
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid #ee0077;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.promo-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
}
::-webkit-scrollbar { width: 14px ; background: #2c0044 ; }
::-webkit-scrollbar-thumb {
    border-radius: 7px ;
    background: linear-gradient(135deg, #e10097 40%, #2efbe8 100%) ;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f677fa 0%, #8000ff 100%) ;
}