@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* ✅ Global Box Sizing & Image Scaling */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reset & Base Layout */
html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #333;
    background: none;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* Header */
/* OLD Header Styles — REMOVE */
/* Enhanced Header Layout */
.custom-header {
  background: linear-gradient(to right, #f8bbd0, #ec407a);
  padding: 2rem 1rem 1.5rem;
  text-align: center;
  color: #2c2c2c;
  position: relative;
  border-bottom: 2px solid #e91e63;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem; /* spacing between title, subtitle, buttons */
}

.custom-header h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.2;
}

.custom-subtitle {
  font-size: 1.1rem;
  margin: 0;
  color: #4e4e4e;
  font-weight: 500;
  max-width: 90%;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.category-btn {
  background-color: #b23a48;
  color: white;
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.category-btn:hover {
  background-color: #d0455d;
}

.header-title-link {
    color: #2c2c2c;
    text-decoration: none;
}


.home-icon-link {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.8rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
}

.header-dropdown {
    position: absolute;
    top: 15px;
    right: 40px;
}

.category-button {
    background-color: #b23a48;
    color: white;
    padding: 8px 14px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
}

.category-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 280px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    right: 0;
    top: 40px;
    border-radius: 6px;
}

.category-menu a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

/* News Ticker */
.header-news-ticker {
    margin-top: 12px;
    overflow: hidden;
    height: 26px;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.header-news-track {
    display: flex;
    animation: scroll-left 25s linear infinite;
    white-space: nowrap;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.header-news-item {
    padding-right: 40px;
    font-size: 20px;
    color: #fff;
}

/* Home Banner */
.homepage-banner-background {
    width: 100%;
    height: 100vh;
    background-image: url('/webusa/static/bg/banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Category Scroll */
.category-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0.5rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.category-scroll::-webkit-scrollbar {
    height: 8px;
}

.category-scroll::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.category-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
}

/* Category Card */
.category-card {
    flex: 0 0 auto;
    background-color: #fff;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    min-width: 140px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    scroll-snap-align: start;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: scale(1.05);
    background-color: #fce4ec;
}

.emoji {
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.emoji-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}

.category-name {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Scroll Buttons */
.scroll-btn {
    background-color: #b23a48;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.8rem;
    padding: 0.6rem 2rem;
    margin: 0 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.scroll-btn:hover {
    background-color: #d0455d;
}

/* Back to Categories */
.back-to-categories {
    text-align: center;
    margin: 20px auto;
    font-size: 1rem;
}

.back-to-categories a {
    color: #b23a48;
    text-decoration: none;
    font-weight: 500;
}

.back-to-categories a:hover {
    text-decoration: underline;
}

/* Product Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.card {
    background-color: #fff;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 10px 0 5px;
    color: #b23a48;
}

.card p {
    font-size: 0.95rem;
    color: #444;
    margin-top: 5px;
    line-height: 1.8;
    white-space: pre-line;
    padding-left: 8px;
    padding-right: 8px;
    text-align: left;
}

.card img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.4s ease, trnsform-origin 0.4s ease;
}

.card:hover img {
    transform: scale(2.5);
    transform-origin: center top; /* Start zoom from the top */
}

.card a {
    text-decoration: none !important;
    color: inherit;
}

.card a:hover {
    text-decoration: underline;
}

.buy-now-btn {
    display: inline-block;
    background-color: #b23a48;
    color: white !important;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.buy-now-btn:hover {
    background-color: #d0455d;
    text-decoration: underline;
}

/* Subcategory Bar */
.subcategory-bar {
    margin: 10px 0 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.subcategory-bar::-webkit-scrollbar {
    display: none;
}

.subcategory-bar a {
    padding: 6px 14px;
    background: #e0e0e0;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s;
}

.subcategory-bar a:hover {
    background: #333;
    color: white;
}

/* Footer */
.custom-footer {
    background: linear-gradient(to top, #cc5c72, #e7af98);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    font-size: 14px;
    border-top: 2px solid #b23a48;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* 📦 Product List inside Card */
.product-list {
    padding-left: 1.2em;
    margin-top: 8px;
    margin-bottom: 0;
    list-style: none;
    line-height: 1.6;
}

.product-list li::before {
    content: "🔹 ";
    color: #b23a48;
    font-weight: bold;
    margin-right: 4px;
}

/* ✅ Product Detail Page Styles */
.product-single-card {
    max-width: 960px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI Emoji', 'Noto Color Emoji', 'Poppins', sans-serif;
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease, transform-origin 0.4s ease;
}

.product-details {
    font-size: 1rem;
    color: #333;
}

.product-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #b23a48;
    font-family: 'Poppins', sans-serif;
}

.product-description {
    line-height: 1.8;
    white-space: pre-line;
    font-family: 'Segoe UI Emoji', 'Noto Color Emoji', 'Poppins', sans-serif;
}

.product-highlights {
    padding-left: 1.5rem;
    margin-top: 1rem;
    list-style: none;
}

.product-highlights li::before {
    content: "🔹 ";
    color: #b23a48;
    font-weight: bold;
    margin-right: 6px;
}
.product-image:hover {
  transform: scale(2.5);
  transform-origin: center top; /* Start zoom from the top */
}
.category-button-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.category-btn {
  background-color: #b23a48;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}

.category-btn:hover {
  background-color: #d0455d;
}
/* Subcategory Bars */
.subcategory-bar, .subsubcategory-bar {
  margin: 20px;
  padding: 10px;
  background-color: #f9f9f9;
  border-left: 5px solid #ec407a;
  font-weight: bold;
}
.subcategory-bar a, .subsubcategory-bar a {
  margin-right: 15px;
  text-decoration: none;
  color: #007BFF;
}
.subcategory-bar a:hover, .subsubcategory-bar a:hover {
  text-decoration: underline;
}

/* Product Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card img {
  width: 100%;
  height: auto;
  max-height: 160px;
  object-fit: contain;
}

.card h3 {
  font-size: 1rem;
  margin: 10px 0 5px;
}



/* Mobile View */
@media (max-width: 768px) {
  .custom-header {
    padding: 4.5rem 1rem 2rem;  /* Increased padding-top for space below absolute dropdown */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    position: relative;
  }

  .header-dropdown {
    position: absolute;
    top:1.2rem; 
    right: 1rem;
    z-index: 99;
  }

  .category-button {
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 5px;
    white-space: nowrap;
  }
  .category-btn.small{
   margin-top: 0.8rem;
  } 
  .custom-header h1 {
    font-size: 1.8rem;
    margin-top: 1.5rem; /* 🟢 KEY: Push header down to avoid overlapping */
   /* margin-bottom: 0.5rem;*/
    
   }

  .custom-subtitle {
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #4e4e4e;
    font-weight: 500;
    max-width: 90%;
  }

  /* (Leave the rest unchanged) */


  .header-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 15px;
  }

  .category-menu {
    top: 35px;
    right: 0;
    min-width: 180px;
  }

  .category-menu a {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  .category-search {
    width: 90%;
    max-width: 400px;
    padding: 10px;
    font-size: 1rem;
    border-radius: 20px;
    border: 1px solid #ccc;
    margin: 20px auto;
    text-align: center;
  }

  .category-scroll-wrapper {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
  }

  .category-scroll {
    padding: 0.8rem 0.5rem;
    gap: 10px;
  }

  .category-card {
    min-width: 120px;
    font-size: 0.85rem;
    padding: 0.6rem;
  }

  .emoji-img {
    width: 30px;
    height: 30px;
  }

  .scroll-btn {
    font-size: 1.5rem;
    padding: 0.4rem 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px;
    max-width: 100%;
  }

  .card {
    width: 90%;
    max-width: 100%;
    min-height: unset;
  }

  .subcategory-bar {
    gap: 8px;
    padding: 8px 5px;
  }

  .subcategory-bar a {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .product-single-card {
    padding: 16px;
    margin: 20px 10px;
    box-shadow: none;
  }

  .product-card-inner {
    flex-direction: column;
    gap: 16px;
  }

  .product-image {
    max-height: 280px;
    object-fit: cover;
    width: 100%;
    border-radius: 10px;
  }

  .product-title {
    font-size: 1.2rem;
    text-align: center;
  }

  .product-description {
    font-size: 1rem;
    text-align: left;
    padding: 0 5px;
  }

  .product-highlights li {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }
  .subcategory-bar,
  .subsubcategory-bar {
    margin: 10px;
    padding: 8px;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    border-left: 3px solid #ec407a;
  }

  .subcategory-bar a,
  .subsubcategory-bar a {
    flex-shrink: 0;
    padding: 4px 8px;
    background-color: #f0f8ff;
    border-radius: 5px;
    font-size: 0.85rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 10px;
  }

  .card {
    padding: 10px;
  }

  .card img {
    max-height: 120px;
  }

  .card h3 {
    font-size: 0.9rem;
  }
}

