/* --- 1. Variables & Reset --- */
:root {
  --primary: #8c4e23; /* Premium Brown */
  --primary-dark: #5d3316; /* Darker Brown for hover */
  --secondary: #e3caa5; /* Gold/Beige */
  --accent-green: #27ae60; /* Success/Action Green */
  --bg-color: #fcf9f5; /* Off-White */
  --white: #ffffff;
  --text-dark: #2d2d1e; /* Deep Olive/Black */
  --text-grey: #666666;
  --border-light: #e0e0e0;

  --font-heading: "Marhey", sans-serif;
  --font-body: "Readex Pro", sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Remove blue tap box on Android */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.5;
  overflow-x: hidden;
  padding-top: 60px; /* Space for sticky header */
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

.container {
  width: 92%;
  max-width: 600px; /* Keep layout tight like an app */
  margin: 0 auto;
}

/* --- 2. Sticky Navbar --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 92%;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
}

.nav-cta-button {
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s;
}

.nav-cta-button:active {
  transform: scale(0.95);
}
.nav-cta-button .btn-icon {
  width: 14px;
  height: 14px;
}

/* --- 3. Product Gallery (Clean + No Stretch + Visible Dots) --- */
.product-gallery {
  width: 100%;
  background: var(--white);
  padding-bottom: 20px;
  position: relative;
  direction: ltr; /* Keeps scrolling logic standard */
}

.gallery-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-track-container {
  display: flex;
  width: 100%;
  height: 50vh; /* Fixed height is CRITICAL */
  max-height: 500px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-track-container::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;

  /* Centers the image in the whitespace */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;

  /* Ensures NO stretching */
  object-fit: contain;
  display: block;
}

/* Dots Indicator */
.gallery-indicators {
  position: absolute;
  bottom: 15px; /* Positioned at bottom of image area */
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  z-index: 10; /* Ensures dots are ON TOP of everything */
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2); /* Grey inactive */
  transition: all 0.3s;
  box-shadow: 0 1px 2px rgba(255, 255, 255, 0.5); /* Tiny shadow for visibility */
}

.dot.active {
  background: var(--primary); /* Brown active */
  width: 25px; /* Elongated active dot */
  border-radius: 10px;
}

/* --- 4. Unified Order Form (The Engine) --- */
.order-engine-section {
  padding: 20px 0 40px 0;
}

.form-wrapper {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.form-header {
  text-align: center;
  margin-bottom: 25px;
}

.product-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.product-subtitle {
  color: var(--text-grey);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 20px;
}
.form-row {
  display: flex;
  gap: 10px;
}
.half {
  flex: 1;
}

.group-label {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1rem;
}

/* --- A. Offers Grid --- */
.offers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offer-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
  overflow: hidden;
}

/* Hide actual radio input */
.offer-card input[type="radio"] {
  display: none;
}

/* Selected State Logic */
.offer-card:has(input:checked) {
  border-color: var(--primary);
  background-color: #fffbf7; /* Very light orange/beige tint */
}

/* Discount Badge */
.badge-discount,
.badge-value {
  position: absolute;
  top: 0;
  right: 0; /* RTL alignment */
  background: #e74c3c;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-bottom-left-radius: 10px;
}
.badge-value {
  background: var(--accent-green);
}

.offer-details {
  display: flex;
  flex-direction: column;
}

.offer-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.offer-price {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Custom Check Circle */
.check-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  position: relative;
}

.offer-card:has(input:checked) .check-circle {
  border-color: var(--primary);
  background: var(--primary);
}

.offer-card:has(input:checked) .check-circle::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
}

/* --- B. Color Selection --- */
.colors-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  min-height: 60px; /* Prevent layout shift while loading */
  align-items: center;
}

/* --- Dynamic Color Rows --- */
.color-row {
  margin-bottom: 15px;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 8px;
  border: 1px dashed #ddd;
}

.color-row-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.colors-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Update Free Delivery Badge in Order Summary */
.free-shipping-badge {
  color: var(--accent-green);
  font-weight: 800;
  background: #e8f5e9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Style for JS injected circles */
.color-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #eee;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.color-circle.selected {
  border-color: var(--text-dark);
  transform: scale(1.1);
}

.color-circle.selected::after {
  content: "✔";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* --- C. Inputs --- */
input,
select {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #fafafa;
  transition: border 0.3s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}

.divider {
  border: none;
  border-top: 1px dashed #ddd;
  margin: 25px 0;
}

/* --- D. Delivery Toggles --- */
.delivery-toggles {
  display: flex;
  gap: 10px;
}

.delivery-option {
  flex: 1;
  cursor: pointer;
}

.delivery-option input {
  display: none;
}

.option-content {
  border: 2px solid var(--border-light);
  border-radius: 10px;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--text-grey);
  transition: all 0.2s;
}

.option-content i {
  width: 24px;
  height: 24px;
}

.delivery-option input:checked + .option-content {
  border-color: var(--primary);
  background: #fffbf7;
  color: var(--primary);
  font-weight: 700;
}

.ship-price {
  font-size: 0.8rem;
  font-weight: 400;
}

.delivery-warning {
  background: #ffebee;
  color: #c0392b;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  text-align: center;
}

/* --- E. Submit Button --- */
.submit-btn {
  width: 100%;
  background: var(--accent-green);
  color: white;
  border: none;
  padding: 18px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.separator {
  opacity: 0.5;
}

/* Pulse Animation */
.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
  }
  70% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(39, 174, 96, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
  }
}

/* Success Message */
.success-box {
  text-align: center;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.icon-circle {
  width: 60px;
  height: 60px;
  background: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  margin-bottom: 15px;
}

/* --- Testimonials (Screenshots Vertical Stack) --- */
.testimonials-section {
  background-color: var(--secondary-accent); /* Keep the beige background */
  padding-bottom: 60px;
}

.testimonial-stack {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers the images */
  gap: 40px; /* Space between each review block */
}

.review-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px; /* Keeps screenshots looking like phone screens */
}

.review-screenshot {
  width: 100%;
  height: auto;
  border-radius: 16px; /* Smooth corners */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Nice depth shadow */
  display: block;
  transition: transform 0.3s ease;
}

.review-screenshot:hover {
  transform: scale(1.02); /* Slight zoom on hover */
}

.stars-below {
  margin-top: 15px;
  font-size: 1.5rem; /* Big visible stars */
  letter-spacing: 5px; /* Spread them out a bit */
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  animation: fade-in-up 0.5s ease;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* 1. Force the Container to Center Everything */
.testimonials-section .container {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers the stack and the title */
  text-align: center;
}

/* 2. Style the Title (Brand Color + Centered) */
.testimonials-section .section-title {
  color: var(--primary); /* Uses your specific Brown #8c4e23 */
  font-family: var(--font-heading); /* Uses "Marhey" font */
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  line-height: 1.4;

  /* Optional: Adds a subtle decorative underline */
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.testimonials-section .section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary); /* The Beige accent */
  border-radius: 2px;
}

/* --- 6. Footer --- */
.footer {
  background: var(--text-dark);
  color: #888;
  padding: 40px 20px;
  text-align: center;
}

.footer h3 {
  color: var(--secondary);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.social-links a {
  color: var(--white);
  transition: color 0.3s;
}
.social-links a:hover {
  color: var(--secondary);
}

.copyright {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* --- Responsive (Desktop) --- */
@media (min-width: 768px) {
  .product-gallery {
    border-radius: 25px;
    margin-bottom: 30px;
  }

  .gallery-slide {
    height: 60vh;
  }

  .form-row {
    flex-direction: row; /* Ensure row on desktop */
  }

  .offers-grid {
    flex-direction: row;
    flex-wrap: wrap; /* Allows cards to wrap to a new line */
  }

  .offer-card {
    flex: 1 1 calc(50% - 12px); /* Creates a perfect 2x2 grid */
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .badge-discount,
  .badge-value {
    left: 50%;
    transform: translateX(-50%);
    top: -10px;
    border-radius: 10px;
    right: auto;
  }

  .masonry-grid {
    column-count: 3; /* 3 columns on desktop */
  }
}
/* --- Floating "Order Now" Button --- */
.floating-cta-container {
  position: fixed;
  bottom: 20px;
  left: 20px; /* Kept on left as per your file */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 25px; /* Pill shape */
  background-color: var(--primary); /* Brown */
  color: var(--white);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(140, 78, 35, 0.4); /* Brown shadow */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.order-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(140, 78, 35, 0.6);
}

.order-fab i {
  width: 20px;
  height: 20px;
}

/* Hide on Desktop if desired (optional) */
@media (min-width: 768px) {
  .floating-cta-container {
    display: none; /* Usually only needed on mobile */
  }
}

/* --- Quality & Details Section --- */
.details-section {
  padding: 3rem 0;
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.sub-head {
  color: var(--text-grey);
  font-size: 1rem;
}

/* Hero Feature (Fabric) */
.hero-feature-card {
  background: var(--bg-color);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.hero-feature-img {
  position: relative;
  height: 220px;
}

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

.badge-floating {
  position: absolute;
  bottom: 15px;
  right: 15px; /* RTL Friendly */
  background: var(--accent-green);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-feature-text {
  padding: 1.5rem;
  text-align: center;
}

.hero-feature-text h3 {
  font-family: var(--font-heading);
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

/* Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
  gap: 10px;
  text-align: center;
}

.spec-item {
  padding: 1rem 0.5rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-box {
  color: var(--primary);
  margin-bottom: 0.5rem;
  background: var(--bg-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.spec-item h4 {
  font-weight: 800;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.spec-item p {
  font-size: 0.75rem;
  color: var(--text-grey);
  line-height: 1.3;
}

/* --- Use Cases Section --- */
.use-cases-section {
  padding: 2rem 0;
  background: var(--bg-color);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.case-card {
  position: relative;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.case-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.case-card:hover img {
  transform: scale(1.05);
}

.case-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(45, 45, 30, 0.9), transparent);
  padding: 2rem 0.8rem 0.8rem;
  color: white;
  text-align: right;
}

.case-overlay h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 2px;
  color: var(--secondary);
}

.case-overlay p {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 300;
}

/* --- Upsell Offer Section --- */
.offer-highlight-section {
  padding: 2rem 0 4rem;
  background: var(--white);
}

.offer-box {
  background: linear-gradient(145deg, #fffbf5, #fff);
  border: 2px dashed var(--primary);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-md);
}

.offer-header h3 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.offer-visual {
  margin: 1.5rem 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.offer-visual img {
  width: 100%;
  display: block;
}

.free-delivery-badge {
  position: absolute;
  top: 10px;
  left: 10px; /* RTL friendly */
  background: #e74c3c; /* Red for attention */
  color: white;
  padding: 0.4rem 1rem;
  transform: rotate(-3deg);
  font-weight: 800;
  border-radius: 4px;
  font-family: var(--font-heading);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.math-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  margin-bottom: 5px;
}

.strike {
  text-decoration: line-through;
  color: #999;
  font-size: 1.1rem;
}

.price-big {
  color: var(--accent-green);
  font-size: 2rem;
  font-weight: 900;
}

.premium-note {
  background: #f0f0f0;
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 1rem 0;
  color: var(--text-dark);
}

.urgency-text {
  color: #c0392b;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cta-pulse-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px 20px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(140, 78, 35, 0.4);
  animation: pulse 2s infinite;
}

.cta-pulse-btn i {
  width: 20px;
  height: 20px;
}
