/* FitCurve Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --primary: #9333ea;
  --primary-dark: #7e22ce;
  --secondary: #f3f4f6;
  --accent: #8b5cf6;
  --text-dark: #111827;
  --text-gray: #4b5563;
  --bg-light: #ffffff;
  --bg-dark: #000000;
  --white: #ffffff;
  --bg-white: #ffffff;
  --bg-secondary: #f9f9f9;
  --accent-pink: #fce5e5;
  --accent-yellow: #fff9e6;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --container-width: 1200px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white);
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

img {
  max-width: 100%;
}

h1, h2, h3, .serif {
  font-family: var(--font-serif);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.flex.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--primary);
    padding: 10px 0;
    white-space: nowrap;
}

.ticker {
    display: inline-block;
    animation: ticker 10s linear infinite;
}

.ticker-item {
    display: inline-block;
    color: white;
    font-weight: 900;
    font-size: 14px;
    font-style: italic;
    padding: 0 40px;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.flex {
  display: flex;
  align-items: center;
}

.grid {
  display: grid;
}

.responsive-grid-2 {
  grid-template-columns: 1fr 1fr;
}

/* Announcement Bar */
.announcement-bar {
    background: #f7f7f7;
    color: #444;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
}

.shipping-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}

.shipping-banner::before, .shipping-banner::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ddd;
}

.shipping-banner span {
    color: var(--primary);
    font-weight: 900;
    font-size: 14px;
    background: white;
    padding: 0 10px;
}

/* Header */
header {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid #efefef;
    position: sticky;
    top: 30px;
    z-index: 1000;
}

header .container {
  justify-content: space-between;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #000;
}

.header-icons {
  gap: 20px;
}

/* Hero Section */
.product-hero {
  padding: 40px 0;
}

.hero-grid {
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
}

/* Gallery */
.gallery-container {
  position: sticky;
  top: 100px;
}

.main-image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f4f4;
  aspect-ratio: 4/5;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.thumbnails {
  margin-top: 20px;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.thumbnail {
  width: 100px;
  aspect-ratio: 1/1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.thumbnail.active {
  border-color: var(--primary);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.info-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.star-rating .stars {
    color: #ffb800;
}

.product-title {
  font-size: 42px;
  line-height: 1.1;
}

.price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.bullets {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullet {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.bullet i {
  color: var(--primary);
}

/* Bundle Section */
.bundle-box {
  background-color: var(--accent-yellow);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #eee;
  margin: 20px 0;
}

.bundle-box h3 {
  margin-bottom: 15px;
  font-size: 18px;
}

.bundle-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bundle-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.trust-icons {
    display: flex;
    justify-content: space-around;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.trust-item i {
    font-size: 24px;
    color: #000;
}

.trust-item span {
    font-size: 14px;
    font-weight: 800;
    color: #000;
}

/* Accordion refinement */
.product-details {
    margin-top: 10px;
}

.detail-item {
    border-bottom: 1px solid #eee;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    cursor: pointer;
    font-weight: 800;
    font-size: 16px;
    color: #000;
}

.detail-header div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-header div i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.detail-header .fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s;
}

.detail-item.active .fa-chevron-down {
    transform: rotate(180deg);
}

.detail-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.detail-item.active .detail-content {
    max-height: 500px;
    padding-bottom: 25px;
}

.bundle-card.active {
    border: 2px solid #000;
    background: #fff;
}

.bundle-card:not(.active) {
    background: #f4f4f4;
}

.bundle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.bundle-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.bundle-radio {
    width: 24px;
    height: 24px;
    border: 2px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bundle-card.active .bundle-radio::after {
    content: "";
    width: 12px;
    height: 12px;
    background: #000;
    border-radius: 50%;
}

.bundle-title {
    font-size: 24px;
    font-weight: 900;
}

.bundle-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

.bundle-price-area {
    text-align: right;
}

.bundle-main-price {
    font-size: 24px;
    font-weight: 900;
}

.bundle-original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.save-tag {
    background: #e9d5ff;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 900;
    margin-left: 10px;
}

.inline-selectors {
    margin-top: 15px;
    display: none;
}

.bundle-card.active .inline-selectors {
    display: block;
}

.inline-selector-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.inline-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.inline-select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.badge-most-popular {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #000;
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    transform: rotate(15deg);
    line-height: 1;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.badge-most-popular span {
    display: block;
    font-size: 8px;
    margin-bottom: 2px;
}

/* Add to Cart */
.add-to-cart-btn {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding: 20px 0;
  border-top: 1px solid #eee;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Urgency Box */
.urgency-box {
  background-color: var(--accent-pink);
  padding: 15px;
  border-radius: 8px;
  font-size: 14px;
  color: #721c24;
  margin-top: 20px;
  border: 1px solid #f5c6cb;
}

.viral-alert {
    background: #ffe4e6;
    border: 1px solid #fecdd3;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    color: #9f1239;
    font-size: 14px;
    line-height: 1.5;
}

.viral-alert b {
    color: #9f1239;
}

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0 25px;
}

.swatch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
}

.swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swatch.active {
    border-color: #000;
}

.swatch.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.swatch-beige { background-color: #e5d5c0; }
.swatch-navy { background-color: #1a237e; }
.swatch-red { background-color: #c62828; }
.swatch-teal { background: #008080; }
.swatch-black { background: #000000; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
}

/* New Sections */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
    margin-top: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-circle {
    width: 100px;
    height: 100px;
    border: 4px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--primary);
}

.stat-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    line-height: 1.4;
}

.testimonials-dark {
    background: #111;
    color: #fff;
    padding: 80px 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.testimonial-card {
    background: #222;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
}

.testimonial-card .stars {
    color: #fbbf24;
    margin-bottom: 15px;
}

.testimonial-card p {
    font-style: italic;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.why-item {
    text-align: center;
}

.why-item i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 15px;
}

.why-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
}

.why-item p {
    font-size: 12px;
    color: var(--text-gray);
}

.bg-purple {
    background-color: var(--primary);
    color: #fff;
}

/* Sections */
.section {
  padding: 80px 0;
}

.bg-forest {
  background-color: var(--primary);
  color: white;
}

.testimonial-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-quote {
  font-size: 24px;
  font-style: italic;
  margin: 20px 0;
}

/* Problem/Solution Banner */
.banner {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('assets/detail.png');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 120px 20px;
}

.banner h2 {
  font-size: 40px;
  margin-bottom: 20px;
}

/* Features Grid */
.features-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}

.feature-item i {
  font-size: 40px;
  margin-bottom: 20px;
}

/* Alternating Sections */
.split-section {
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.split-section.reverse {
  direction: rtl;
}

.split-section.reverse .content {
  direction: ltr;
}

.split-section img {
  width: 100%;
  border-radius: 12px;
}

/* FAQ */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #eee;
}

.faq-question {
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.faq-answer {
  padding-bottom: 20px;
  color: var(--text-gray);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer with Wave */
.footer-wave {
  width: 100%;
  height: 100px;
  background: white;
  position: relative;
  overflow: hidden;
}

.footer-wave svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: auto;
}

footer {
  background: black;
  color: white;
  padding: 60px 0 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Sticky Bar */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
  padding: 15px 0;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-bar.visible {
  transform: translateY(0);
}

.sticky-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticky-bar-price {
  font-weight: 700;
  color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 991px) {
  .hero-grid, .split-section, .features-grid, .stats-grid, .testimonial-grid {
    grid-template-columns: 1fr;
  }
  
  .why-choose-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .hero-grid {
    gap: 30px;
  }
  
  .product-title {
    font-size: 32px;
  }
  
  .gallery-container {
    position: static;
  }
}

@media (max-width: 768px) {
  .responsive-grid-2 {
    grid-template-columns: 1fr;
  }

  .why-choose-grid {
    grid-template-columns: 1fr;
  }

  .trust-icons {
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }
  
  .trust-item i {
    font-size: 20px;
  }
  
  .trust-item span {
    font-size: 12px;
  }

  h1 {
    font-size: 32px !important;
  }

  .banner h2 {
    font-size: 28px;
  }

  .split-section.reverse {
    direction: ltr; /* Reset reverse direction on mobile so text stacks uniformly */
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .ticker-item {
    font-size: 12px;
    padding: 0 20px;
  }
  
  .modal-content {
    margin: 15% auto;
    padding: 20px;
    width: 95%;
  }

  .hide-mobile {
      display: none !important;
  }
  
  .sticky-bar .container {
      padding: 10px !important;
      gap: 5px !important;
  }
  
  #sticky-color, .sticky-bar select {
      padding: 4px !important;
      font-size: 11px !important;
  }
  
  .sticky-bar .add-to-cart-btn {
      padding: 6px 12px !important;
      font-size: 11px !important;
  }
  
  /* Prevent cutting the main image */
  .main-image {
      height: 400px;
  }
  
  /* Scale down thumbnails to prevent overflow */
  .thumbnail {
      width: 75px;
      height: 75px;
  }
  
  /* Scale down color swatches and allow tight wrapping so they fit precisely */
  .swatch {
      width: 45px !important;
      height: 45px !important;
  }
  .color-swatches {
      gap: 8px !important;
  }
  
  /* Force trust badges below Add to Cart to wrap cleanly */
  .trust-badges {
      flex-wrap: wrap;
      gap: 15px !important;
  }
  .trust-badges .badge {
      width: 45%; 
      font-size: 11px;
  }
}

@media (max-width: 768px) {
  /* Enforce strict containment on all top level wrappers */
  .container, .gallery-container, .bundle-options, .product-info {
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  /* Fix the thumbnail carousel extending past the screen */
  .thumbnails, .gallery-thumbnails {
    max-width: 100vw !important;
    overflow-x: auto !important;
    padding-right: 20px; /* Space for scrolling */
  }

  /* Make sure bundle elements shrink */
  .bundle-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .inline-selector-item {
    flex-wrap: wrap; 
  }
}
