/* ------------------------------------------------------------
   THEME TOKENS & GLOBAL BASE
   - Color variables
   - Element resets
   - Base layout constraints
------------------------------------------------------------ */
:root {
  --color-primary: #ff4757;
  --color-primary-hover: #e04050;
  --color-secondary: #111112;
  --color-badge: #ec2323;
  --color-text: #2f3542;
  --color-text-light: #747d8c;
  --color-black: #1e272e;
  --color-white: #ffffff;
  --color-bg-light: #ffffff;
  --color-bg-light-hover: #f8f8f8;
  --color-bg-light-hover2: #f0f0f0;
  --color-bg-light-hover3: #eaeaea;
  --color-border: rgba(47, 53, 66, 0.1);
  --color-border-light: #f2f2f2;
  --color-border-lighter: #f5f5f5;
  --color-shadow: rgba(0, 0, 0, 0.05);
  --color-shadow-light: rgba(0, 0, 0, 0.08);
  --success: #2ed573;
}

* {
  font-family: 'Segoe UI', Arial, sans-serif;
}

html, body {
  overflow-x: hidden;
}

body {
  background: var(--color-bg-light);
  color: var(--color-text);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ------------------------------------------------------------
   VISIBILITY TOGGLES (PC vs Phone)
------------------------------------------------------------ */
.phone-categories { display: none; }

/* ------------------------------------------------------------
   HORIZONTAL SCROLL WRAPPERS
   - Used by sliders (banner/brand/category)
------------------------------------------------------------ */
.slider-wrapper,
.brand-slider,
.category-slider {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

/* ------------------------------------------------------------
   GENDER SWITCHER BUTTONS
------------------------------------------------------------ */
.gender-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 18px 0;
  background-color: var(--color-white);
  width: 100%;
  align-items: center;
}

.gender-btn {
  padding: 5px 15px;
  border-radius: 20px;
  border: 2px solid var(--color-secondary);
  background: var(--color-white);
  font-weight: bold;
  cursor: pointer;
  width: 45%;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.gender-btn.active {
  background: var(--color-secondary);
  color: #fff;
  border: 2px solid var(--color-secondary);
}

/* ------------------------------------------------------------
   SECTION WRAPPERS / COMMON LAYOUT
------------------------------------------------------------ */
.all-products-section {
  text-align: center;
  margin-top: 40px;
}

.main-product-grid {
  margin-top: 20px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.trending-section {
  padding: -50px; /* (kept as-is) */
  background-color: #000;
}

.pc-categories {
  text-align: center;
  margin-top: 20px;
}

/* ------------------------------------------------------------
   TOP CATEGORIES (Phone-style defaults)
------------------------------------------------------------ */
.slider-wrapper {
  position: relative;
  white-space: nowrap;
  padding-top: 8px;
  margin-bottom: 8px;
}

.top-brand-title {
  text-align: center;
  color: #111;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0;
}

.category-slider {
  display: flex;
  gap: 6px;
  padding-bottom: 8px;
  margin: 0 7px;
  scrollbar-width: none;
}
.category-slider::-webkit-scrollbar { display: none; }

.category-slide {
  min-width: 70px;
  text-align: center;
  padding: 0;
  flex: 0 0 auto;
}

.category-slide img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 5px;
  background-color: #f4f6f6;
  padding: 8px;
  border-radius: 50%;
}

.category-slide p {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 1px;
}

/* ------------------------------------------------------------
   TOP BRANDS (Phone-style defaults)
------------------------------------------------------------ */
.brand-slider {
  display: flex;
  gap: 50px;
  margin: 0 7px 18px 7px;
  scrollbar-width: none;
}
.brand-slider::-webkit-scrollbar { display: none; }

.brand-slide {
  min-width: 70px;
  text-align: center;
  flex: 0 0 auto;
}

.brand-slide img {
  height: 70px;
  vertical-align: middle;
  object-fit: contain;
  padding: 5px;
}

/* ------------------------------------------------------------
   BRANDS STRIP (Standalone section)
------------------------------------------------------------ */
.brands-section {
  padding: 10px;
  text-align: center;
  overflow: hidden;
}

.brands-container {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 0;
}
.brands-container::-webkit-scrollbar { display: none; }

.brands-container img {
  height: 70px;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.brands-container img:hover { transform: scale(1.08); }

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 20px;
}
.section-title span {
  color: var(--primary);
  font-size: 18px;
  margin-top: -10px;
}

/* ------------------------------------------------------------
   PROMO / TRENDING BANNER (center + left/right images)
   - Uses var(--primary) intentionally (kept as-is)
------------------------------------------------------------ */
.promo-banner {
  width: 100%;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  gap: 24px;
  box-sizing: border-box;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 1;
}
.promo-banner > * { position: relative; z-index: 2; }

.product-left,
.product-right {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.product-image-trending {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: contain;
  border-radius: 30px;
}

.content-center {
  flex: 2 1 0;
  text-align: center;
  color: #fff;
  min-width: 0;
  padding-inline: 8px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.timer-circle {
  background: var(--primary);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.number { font-size: 24px; font-weight: bold; line-height: 1; }
.label  { font-size: 10px; font-weight: 600; letter-spacing: 1px; margin-top: 2px; }

.main-title {
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: #000;
}

.subtitle {
  font-size: clamp(13px, 1.8vw, 16px);
  margin-bottom: 30px;
  letter-spacing: 1px;
  color: #000;
  font-weight: 500;
  opacity: 0.8;
}

.shop-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-transform: uppercase;
}
.shop-btn:hover { transform: translateY(-1px); }
.shop-btn:active { transform: translateY(-1px) scale(0.99); }

/* ------------------------------------------------------------
   DISCOVER PRODUCTS GRID
------------------------------------------------------------ */
.discover-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 30px;
}

/* ------------------------------------------------------------
   BIG DEALS (Mobile-visible)
------------------------------------------------------------ */
@media (min-width: 768px) {
  .big-deals-section { display: none; }
}

@media (max-width: 768px) {
  .big-deal-container {
    padding: 10px 20px;
    background: linear-gradient(to bottom, #f87618, #f8b043);
    border-radius: 10px;
    margin: 10px;
  }

  .big-deals-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .deal-card {
    width: calc(50% - 6px);
    box-sizing: border-box;
    margin-bottom: 12px;
  }
  .deal-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
  }

  .big-deals-title {
    text-align: center;
    font-size: 45px;
    font-weight: bold;
    color: #ffcc00;
    animation: pulse 1.5s infinite;
  }
  @keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
  }

  .big-deals-subtitle {
    text-align: center;
    font-size: 16px;
    margin: 8px 0 20px;
    color: #080808;
    font-weight: 600;
  }

  .discover-button {
    display: block;
    margin: 15px auto 0;
    background-color: #ff5100ff;
    color: #fff;
    font-weight: bold;
    font-size: 15px;
    padding: 10px 24px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    width: fit-content;
    transition: background 0.3s;
  }
  .discover-button:hover { background-color: #e62300ff; }
}

/* ------------------------------------------------------------
   RESPONSIVE GRID COLUMNS (Main products)
------------------------------------------------------------ */
@media (max-width: 1000px) {
  .main-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .main-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .main-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------
   PROMO BANNER BREAKPOINTS
------------------------------------------------------------ */
@media (max-width: 1200px) {
  .promo-banner { padding: 32px; }
  .timer-circle { width: 72px; height: 72px; }
  .number { font-size: 22px; }
}

@media (max-width: 992px) {
  .promo-banner { padding: 28px; gap: 20px; }
  .content-center { padding-inline: 4px; }
  .timer-circle { width: 68px; height: 68px; }
  .number { font-size: 20px; }
  .product-image-trending { max-width: 360px; border-radius: 24px; }
}

/* Phones: stack vertically, keep same design elements */
@media (max-width: 768px) {
  .promo-banner {
    padding: 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  .product-left,
  .product-right,
  .content-center { width: 100%; }

  .product-image-trending {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: 0;
    margin: 0 auto;
  }

  .content-center { padding: 0 8px; }

  .countdown-timer {
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }

  .timer-circle { width: 56px; height: 56px; }
  .number { font-size: 16px; }
  .label  { font-size: 8px; }

  .main-title {
    font-size: clamp(18px, 5vw, 26px);
    margin-bottom: 6px;
  }
  .subtitle {
    font-size: clamp(12px, 3vw, 14px);
    margin-bottom: 16px;
  }
  .shop-btn {
    padding: 10px 22px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .promo-banner { padding: 12px; gap: 12px; }
  .product-image-trending {
    max-width: 280px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
  }
  .timer-circle { width: 50px; height: 50px; }
  .number { font-size: 15px; }
  .label  { font-size: 7px; }
  .shop-btn {
    padding: 8px 18px;
    font-size: 13px;
  }
}

/* ------------------------------------------------------------
   BRANDS & TITLES — SMALLER DEVICES
------------------------------------------------------------ */
@media (max-width: 540px) {
  .brands-container img { height: 45px; }
  .section-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: -10px;
    margin-bottom: 0;
  }
  .brands-section { margin-bottom: -10px; }
}

/* ------------------------------------------------------------
   PHONE-SPECIFIC CATEGORY/BRAND SIZING + VISIBILITY
------------------------------------------------------------ */
@media (max-width: 760px) {
  .gender-buttons { display: flex; }

  .pc-categories { display: none; }
  .phone-categories { display: inline; }

  /* Top Brands (phone override) */
  .brand-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 7px 18px 7px;
    scrollbar-width: none;
  }
  .brand-slider::-webkit-scrollbar { display: none; }

  .brand-slide { min-width: 70px; text-align: center; flex: 0 0 auto; }
  .brand-slide img {
    height: 45px;
    vertical-align: middle;
    object-fit: contain;
    padding: 5px;
  }

  /* Top Categories (phone override) */
  .category-slider {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin: 0 7px;
    scrollbar-width: none;
  }
  .category-slider::-webkit-scrollbar { display: none; }

  .category-slide {
    min-width: 80px;
    text-align: center;
    padding: 0;
    flex: 0 0 auto;
  }
  .category-slide img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 5px;
    background-color: #f4f6f6;
    padding: 3px;
    border-radius: 50%;
  }
}

/* ------------------------------------------------------------
   DESKTOP-LEANING TWEAKS (bigger gaps/thumbnails)
------------------------------------------------------------ */
@media (min-width: 760px) {
  .product-image { height: 220px; }
  .product-image img { width: 130px; height: 180px; }

  .discover-products { gap: 22px; }

  .category-slider { gap: 18px; }
  .brand-slider { gap: 18px; }
}

/* ------------------------------------------------------------
   VERY SMALL DEVICES
------------------------------------------------------------ */
@media (max-width: 600px) {
  .trending-img img { max-width: 70px; max-height: 60px; }
  .discover-products { gap: 7px; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 440px) {
  .product-info { padding: 10px 5px; }
  .section-title { font-size: 15px; }
}
