/* client/style.css - Consolidated and Organized */

/* --- 1. DESIGN TOKENS (CSS Variables) --- */
:root {
  /* Color Palette */
  --brand-background: #F8F4EE;
  --brand-dark: #2C2A29;
  --brand-text: #3D352E;
  --brand-accent: #E5A44E;
  --brand-accent-light: rgba(229, 164, 78, 0.1);

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-ui: 'DM Sans', sans-serif;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Transitions & Effects */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(61, 53, 46, 0.07);
  --shadow-xl: 0 20px 40px rgba(61, 53, 46, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(61, 53, 46, 0.25);
}

/* --- 2. GLOBAL BASE STYLES --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--brand-background);
  color: var(--brand-text);
  overflow-x: hidden;
}

body.cart-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

.subheading {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* --- 3. LAYOUT & UTILITIES --- */
.main-content-area {
  position: relative;
  z-index: 1;
  padding-top: 100px;
  min-height: 100vh;
  background-color: var(--brand-background);
}

.main-content {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    min-height: calc(100vh - 80px);
    background-color: var(--brand-background);
}

.section-bordered {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- 4. COMPONENTS - HEADER & NAVIGATION --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 2.5rem;
    transition: all 0.4s var(--ease-out-quart);
    background-color: transparent;
}

#main-header.scrolled {
    padding: 1rem 2.5rem;
    background-color: rgba(248, 244, 238, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

#nav-icon {
  width: 55px;
  height: 55px;
  padding-right: 5px;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--brand-dark);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--brand-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.brand-name {
    font-family: var(--font-heading) !important;
    font-size: 1.75rem !important;
    letter-spacing: 0.12em !important;
    font-weight: 800 !important;
    color: var(--brand-dark) !important;
    text-transform: uppercase !important;
    position: relative !important;
    z-index: 1 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease;
}

.brand-name::before {
    content: '';
    position: absolute;
    inset: -10px -20px;
    background-image: url('./images/marble-natural.webp');
    background-size: cover;
    opacity: 0.07;
    z-index: -1;
    mix-blend-mode: multiply;
    transition: opacity 0.3s ease;
}

.brand-name:hover {
    transform: translateY(-1px);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.brand-name:hover::before {
    opacity: 0.12;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--brand-dark);
}

.logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.cart-button {
    position: relative;
    padding: 0.5rem;
    margin-left: 1.5rem;
}

.cart-button svg {
    width: 28px;
    height: 28px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--brand-accent);
    color: white;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(25%, -25%);
}

/* --- 5. COMPONENTS - BUTTONS --- */
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-accent);
  color: var(--brand-dark);
  padding: 0.8rem 1.8rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid transparent;
  box-shadow: var(--shadow-md);
  transition: all 0.4s var(--ease-out-quart);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a.btn:hover,
button.btn:hover {
  background-color: var(--brand-dark);
  color: var(--brand-accent);
  border-color: var(--brand-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

a.btn-secondary,
button.btn-secondary {
  background-color: #A0A0A0;
  color: white;
}
a.btn-secondary:hover,
button.btn-secondary:hover {
  background-color: var(--brand-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-animated {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-animated:hover {
    transform: translateX(5px);
}

.btn-animated .arrow-icon {
    transition: transform 0.3s ease;
}

.btn-animated:hover .arrow-icon {
    transform: translateX(5px);
    animation: bounceX 1s infinite;
}

@keyframes bounceX {
    0%, 100% {
        transform: translateX(5px);
    }
    50% {
        transform: translateX(10px);
    }
}

/* --- 6. SECTIONS - HOME PAGE --- */
.hero-section {
    min-height: 90vh;
    padding: 6rem 0 8rem;
    position: relative;
    background-color: var(--brand-background);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('./images/antique-pattern.webp');
    opacity: 0.08;
    mix-blend-mode: multiply;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--brand-background), transparent);
    z-index: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    line-height: 1.1;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-text-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-text-content p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--brand-text);
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-media-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
    height: 600px;
}

.hero-media-grid img,
.hero-media-grid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.media-item-1 {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
}

.media-item-2 {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
}

.media-item-3 {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
}

/* Featured Collection Section */
.featured-collection {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #fff, var(--brand-background));
    position: relative;
}

.featured-collection::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('./images/antique-pattern.webp');
    opacity: 0.05;
    z-index: 0;
}

.collection-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.collection-header::after {
    content: '';
    width: 60px;
    height: 2px;
    background: var(--brand-accent);
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.collection-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s var(--ease-out-quart);
    position: relative;
    transform: translateY(0);
    cursor: pointer;
}

.collection-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.collection-item-image {
    position: relative;
    padding-bottom: 125%;
    overflow: hidden;
    background: var(--brand-background);
}

.collection-item-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-quart);
    will-change: transform;
}

.collection-item:hover .collection-item-image img {
    transform: scale(1.05);
}

.collection-item-content {
    padding: 1.5rem;
    text-align: center;
}

.collection-item-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
}

.collection-item-price {
    font-family: var(--font-ui);
    color: var(--brand-accent);
    font-weight: 600;
    font-size: 1.125rem;
}

.collection-item-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--brand-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1;
}

.view-collection-btn {
    margin-top: 4rem;
    text-align: center;
}

/* --- CONSOLIDATED FIX FOR 'VIEW ALL' BUTTON --- */

.view-all-products {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background-color: var(--brand-accent);
    color: var(--brand-dark); /* Set initial dark text color */
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    z-index: 1; /* Ensure text is on a higher layer */
    transition: color 0.4s ease, transform 0.3s var(--ease-out-quart);
}

.view-all-products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-dark);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out-quart);
    z-index: -1; /* Puts the dark background behind the text */
}

.view-all-products:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(229, 164, 78, 0.3);
    color: var(--brand-accent) !important; /* Forces the text to be white on hover */
}

.view-all-products:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.view-all-products svg {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.view-all-products:hover svg {
    transform: translateX(5px);
}

/* Core Values Section */
.core-values-section {
    padding: 8rem 0;
    background: linear-gradient(to bottom, #fff, var(--brand-background));
    position: relative;
}

.section-line {
    width: 60px;
    height: 2px;
    background: var(--brand-accent);
    margin: 2rem auto;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.value-card {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--brand-accent), var(--brand-accent-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.value-card:hover::before {
    opacity: 1;
}

.value-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: var(--brand-background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.value-card:hover .value-icon {
    transform: scale(1.1);
}

.value-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--brand-dark);
    margin-bottom: 1.5rem;
}

.value-line {
    width: 40px;
    height: 2px;
    background: var(--brand-accent);
    margin: 1.5rem auto;
    transition: width 0.3s ease;
}

.value-card:hover .value-line {
    width: 60px;
}

.value-description {
    color: var(--brand-text);
    line-height: 1.6;
    font-size: 1.1rem;
}

.emoji-icon {
    font-size: 3rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.3s ease;
}

.value-card:hover .emoji-icon {
    transform: scale(1.2);
}

.value-icon {
    margin: 0 auto 2rem;
    width: auto;
    height: auto;
}

/* Promise Section Styles */
#our-promise {
    position: relative;
    overflow: hidden;
}

.brand-emblem video {
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s var(--ease-out-quart);
}

.brand-emblem:hover video {
    transform: translateY(-10px);
}

.bg-gradient-radial {
    background: radial-gradient(circle at center, var(--brand-accent-light) 0%, transparent 70%);
}

/* Contact Section Styles */
.contact-card {
    display: block;
    text-decoration: none;
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: inherit;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-card:hover .contact-icon {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Bento Grid */
.bento-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
    padding: 0 1rem;
}

.bento-item {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
}

.bento-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.size-box {
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.size-box:hover {
    background-color: var(--brand-accent);
    color: white;
}

.size-box:hover p {
    color: white;
}

/* Shop Page */
.shop-page {
    padding: 0;
    margin: 0;
    width: 100%;
    background-color: var(--brand-background);
}

.shop-hero {
    background-image: url('./images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    padding-top: 6rem;
    padding-bottom: 6rem;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 1.6rem;
    text-align: center;
    overflow: hidden;
}

.shop-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./images/antique-pattern.webp');
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
}

.shop-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--brand-dark);
    margin-bottom: var(--space-m);
    position: relative;
}

.shop-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--brand-text);
    opacity: 0.9;
}

.filter-section {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-button {
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-text);
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-button:hover:not(.active) {
    background-color: var(--brand-background);
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.filter-button.active {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(229, 164, 78, 0.2);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1440px;
    margin: 0 auto;
}

.product-card-link {
    color: inherit;
    text-decoration: none;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s var(--ease-out-quart);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    padding-top: 100%;
    background: #f9f9f9;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-quart);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-details {
    padding: 1.5rem;
    text-align: center;
}

.product-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.product-category {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-text);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.product-price {
    font-family: var(--font-ui);
    color: var(--brand-accent);
    font-weight: 600;
    font-size: var(--text-lg);
}

/* FOOTER */
.main-footer {
  background-color: var(--brand-dark);
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: var(--space-xl) 0 var(--space-m);
}

.main-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('./images/marble-natural.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  mix-blend-mode: luminosity;
}

.footer-container {
  position: relative;
  z-index: 1;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
  font-family: var(--font-ui);
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

.footer-link:hover {
  color: var(--brand-accent);
}

/* CHECKOUT */
.checkout-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .checkout-layout-grid {
    grid-template-columns: 8fr 6fr;
  }
}

.checkout-form-section {
  padding: var(--space-l);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: white;
  position: relative;
  z-index: 10;
}

.form-container {
  width: 100%;
  max-width: 480px;
  margin-top: var(--space-2xl);
}

.form-group {
  margin-bottom: var(--space-m);
}

.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.75rem var(--space-s);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 2px rgba(229, 164, 78, 0.3);
}

.iti {
  width: 100%;
}

.iti__flag-container {
  border-right: 1px solid #d1d5db;
}

.payment-method {
  margin-top: 0.75rem;
  padding: var(--space-s);
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
}

.payment-method span:first-child {
  font-weight: 600;
}

.payment-method span:last-child {
  font-size: 0.875rem;
  color: var(--brand-text);
}

.checkout-summary-section {
  background-image: url('./images/antique-pattern.webp');
  background-repeat: repeat;
  padding: var(--space-l);
  position: relative;
  z-index: 5;
}

.checkout-summary-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(248, 244, 238, 0.96);
  z-index: 0;
}

.summary-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--space-2xl);
}

.summary-divider {
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: var(--space-m) 0;
}

#otp-modal .form-group {
  text-align: left;
}

#otp-modal input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  border-color: #d1d5db;
}

#otp-modal .btn {
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
}

#otp-modal #cancel-otp-button {
  background-color: #e5e7eb;
  color: var(--brand-dark);
}

#otp-modal #cancel-otp-button:hover {
  background-color: #d1d5db;
}

/* UTILITIES */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s var(--ease-out-quart), transform 1s var(--ease-out-quart);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-message {
  background-color: var(--brand-dark);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: inline-block;
}

.toast-message.show {
  opacity: 1;
  transform: translateY(0);
}

#contact-popover {
  transition: opacity 0.4s ease;
}

#contact-popover.visible {
  opacity: 1;
  pointer-events: auto;
}

#contact-popover-content {
  transition: transform 0.3s var(--ease-out-quart);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#contact-popover.visible #contact-popover-content {
  transform: scale(1) translate(-50%, -50%);
}

#contact-popover-content a {
  color: var(--brand-accent);
  font-weight: 500;
  text-decoration: underline;
}

#popover-close {
  font-size: 1.5rem;
  line-height: 1;
  color: #333;
}

/* MEDIA QUERIES */
@media (max-width: 1024px) {
  .hero-section {
    padding-top: 8rem;
    padding-bottom: 6rem;
  }

  .hero-section .grid {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }

  .hero-text-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  #main-header nav,
  #main-header .border-l,
  #main-header .hidden.md\:inline-block {
    display: none;
  }

  #main-header .ml-8 {
    margin-left: 0;
  }

  section {
    padding: 4rem 0;
  }

  h2 {
    font-size: 2.5rem;
  }

  .hero-media-grid {
    height: auto;
    grid-template-columns: 1fr;
  }

  .media-item-1,
  .media-item-2,
  .media-item-3 {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .media-item-1 {
    height: 400px;
  }

  .media-item-2,
  .media-item-3 {
    height: 200px;
  }

  #our-promise .grid,
  .core-values-section .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-section .text-lg {
    font-size: 1rem;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.8rem;
  }

  section {
    padding: 3rem 0;
  }

  h2 {
    font-size: 2rem;
  }

  #collection-grid {
    grid-template-columns: 1fr;
  }

  #cart-panel {
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
    }
}

@media (max-width: 767px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .bento-item {
        padding: 1.25rem;
    }
    .sizes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .featured-collection {
        padding: 3rem 0;
    }
    .collection-header {
        margin-bottom: 2rem;
    }
    .text-4xl {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .bento-item {
        padding: 1rem;
    }
    .emoji-icon {
        font-size: 2.5rem;
    }
    .text-xl {
        font-size: 1.25rem;
    }
    .size-box {
        padding: 0.75rem;
    }
    .size-box p {
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}

/* --- PRODUCT PAGE STYLING --- */

.product-page {
    background-color: var(--brand-background);
}

.product-page-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.product-page-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('./images/antique-pattern.webp');
    background-size: cover;
    opacity: 0.08;
    mix-blend-mode: multiply;
    z-index: -1;
}

.product-page-main .grid.lg\:grid-cols-2 {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .product-page-main .grid.lg\:grid-cols-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-image-wrapper {
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.main-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

#thumbnail-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0.5rem;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#thumbnail-grid::-webkit-scrollbar {
    display: none;
}

.thumbnail-image {
    display: block;
    width: 80px;
    height: 80px;
    padding: 4px; /* Adds a little space around the image */
    background-color: white; /* Ensures a clean background */
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    object-fit: contain; /* This is the key property to prevent cropping */
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: var(--brand-accent);
    transform: scale(1.05);
}

#scroll-left, #scroll-right {
    display: none;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-ui);
    transition: all 0.3s ease;
}

.quantity-selector:focus-within {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 2px rgba(229, 164, 78, 0.3);
}

.quantity-selector button {
    padding: 0 0.5rem;
    font-size: 1.5rem;
    color: var(--brand-text);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.quantity-selector button:hover {
    color: var(--brand-accent);
}

.accordion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.accordion-header {
    width: 100%;
    text-align: left;
    background-color: transparent;
    border: none;
    padding: 1.25rem 0;
    font-family: var(--font-heading);
    color: var(--brand-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    color: var(--brand-accent);
}

.accordion-header span {
    font-size: 1.25rem;
    font-weight: 500;
}

.accordion-header .plus-minus {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header .plus-minus {
    transform: rotate(45deg);
}

.accordion-content {
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    padding: 0;
}

.accordion-content p {
    padding-bottom: 1.5rem;
}

/* --- SHOP PAGE STYLING --- */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1440px;
    margin: 0 auto;
}

.product-card-link {
    color: inherit;
    text-decoration: none;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s var(--ease-out-quart);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    padding-top: 100%;
    background: #f9f9f9;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-quart);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-details {
    padding: 1.5rem;
    text-align: center;
}

.product-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.product-category {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-text);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.product-price {
    font-family: var(--font-ui);
    color: var(--brand-accent);
    font-weight: 600;
    font-size: var(--text-lg);
}

/* --- CART PANEL STYLING --- */

#cart-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#cart-panel-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

#cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out-quart);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
}

#cart-panel.open {
    transform: translateX(0);
}

body.cart-open {
    overflow: hidden;
}

#cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    gap: 1rem; /* Add this line for spacing */
}

/* --- CHECKOUT STYLING --- */

.checkout-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

@media (min-width: 1024px) {
    .checkout-layout-grid {
        grid-template-columns: 8fr 6fr;
    }
}

.checkout-form-section {
    padding: var(--space-l);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: white;
    position: relative;
    z-index: 10;
}

.form-container {
    width: 100%;
    max-width: 480px;
    margin-top: var(--space-2xl);
}

.form-group {
    margin-bottom: var(--space-m);
}

.form-group label {
    display: block;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.75rem var(--space-s);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 2px rgba(229, 164, 78, 0.3);
}

.iti {
    width: 100%;
}

.iti__flag-container {
    border-right: 1px solid #d1d5db;
}

.payment-method {
    margin-top: 0.75rem;
    padding: var(--space-s);
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-ui);
}

.payment-method span:first-child {
    font-weight: 600;
}

.payment-method span:last-child {
    font-size: 0.875rem;
    color: var(--brand-text);
}

.checkout-summary-section {
    background-image: url('./images/antique-pattern.webp');
    background-repeat: repeat;
    padding: var(--space-l);
    position: relative;
    z-index: 5;
}

.checkout-summary-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(248, 244, 238, 0.96);
    z-index: 0;
}

.summary-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--space-2xl);
}

.summary-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: var(--space-m) 0;
}

#otp-modal .form-group {
    text-align: left;
}

#otp-modal input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    border-color: #d1d5db;
}

#otp-modal .btn {
    border-radius: 999px;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
}

#otp-modal #cancel-otp-button {
    background-color: #e5e7eb;
    color: var(--brand-dark);
}

#otp-modal #cancel-otp-button:hover {
    background-color: #d1d5db;
}

/* --- UTILITIES & MEDIA QUERIES --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s var(--ease-out-quart), transform 1s var(--ease-out-quart);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-message {
  background-color: var(--brand-dark);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: inline-block;
}

.toast-message.show {
  opacity: 1;
  transform: translateY(0);
}

#contact-popover {
  transition: opacity 0.4s ease;
}

#contact-popover.visible {
  opacity: 1;
  pointer-events: auto;
}

#contact-popover-content {
  transition: transform 0.3s var(--ease-out-quart);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#contact-popover.visible #contact-popover-content {
  transform: scale(1) translate(-50%, -50%);
}

#contact-popover-content a {
  color: var(--brand-accent);
  font-weight: 500;
  text-decoration: underline;
}

#popover-close {
  font-size: 1.5rem;
  line-height: 1;
  color: #333;
}

@media (max-width: 1024px) {
  .hero-section {
    padding-top: 8rem;
    padding-bottom: 6rem;
  }

  .hero-section .grid {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }

  .hero-text-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  #main-header nav,
  #main-header .border-l,
  #main-header .hidden.md\:inline-block {
    display: none;
  }

  #main-header .ml-8 {
    margin-left: 0;
  }

  section {
    padding: 4rem 0;
  }

  h2 {
    font-size: 2.5rem;
  }

  .hero-media-grid {
    height: auto;
    grid-template-columns: 1fr;
  }

  .media-item-1,
  .media-item-2,
  .media-item-3 {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .media-item-1 {
    height: 400px;
  }

  .media-item-2,
  .media-item-3 {
    height: 200px;
  }

  #our-promise .grid,
  .core-values-section .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-section .text-lg {
    font-size: 1rem;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.8rem;
  }

  section {
    padding: 3rem 0;
  }

  h2 {
    font-size: 2rem;
  }

  #collection-grid {
    grid-template-columns: 1fr;
  }

  #cart-panel {
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
    }
}

@media (max-width: 767px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .bento-item {
        padding: 1.25rem;
    }
    .sizes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .featured-collection {
        padding: 3rem 0;
    }
    .collection-header {
        margin-bottom: 2rem;
    }
    .text-4xl {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .bento-item {
        padding: 1rem;
    }
    .emoji-icon {
        font-size: 2.5rem;
    }
    .text-xl {
        font-size: 1.25rem;
    }
    .size-box {
        padding: 0.75rem;
    }
    .size-box p {
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}
/* --- PRODUCT PAGE STYLING --- */

.product-page {
    background-color: var(--brand-background);
}

.product-page-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.product-page-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('./images/antique-pattern.webp');
    background-size: cover;
    opacity: 0.08;
    mix-blend-mode: multiply;
    z-index: -1;
}

.product-page-main .grid.lg\:grid-cols-2 {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .product-page-main .grid.lg\:grid-cols-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    /* gap: 1.5rem; */
}

.main-image-container {
    position: relative;
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
}

.main-image-container img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.image-nav-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
    color: var(--brand-accent);
}

#thumbnail-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1rem;
    padding-bottom: 0.5rem;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#thumbnail-grid::-webkit-scrollbar {
    display: none;
}

.thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: var(--brand-accent);
    transform: scale(1.05);
}

.product-info-wrapper {
    text-align: left;
}

.product-details p,
.product-details h1 {
    text-align: left;
}

/* Radio button styles for scent and size */
#scent-options label,
#size-options label {
    display: inline-block;
}

#scent-options input,
#size-options input {
    display: none;
}

#scent-options input + span,
#size-options input + span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#scent-options input:checked + span,
#size-options input:checked + span {
    background-color: var(--brand-accent);
    color: white;
    font-weight: 600;
    border-color: var(--brand-accent);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    font-family: var(--font-ui);
    transition: all 0.3s ease;
}

.quantity-selector:focus-within {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 2px rgba(229, 164, 78, 0.3);
}

.quantity-selector button {
    padding: 0 0.5rem;
    font-size: 1.5rem;
    color: var(--brand-text);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.quantity-selector button:hover {
    color: var(--brand-accent);
}

#quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--brand-dark);
}


/* --- PRODUCT PAGE IMAGE NAVIGATION & STYLE FIXES --- */

/* Ensure the wrapper is a positioning context for arrows */
.main-image-wrapper {
    position: relative;
}

/* Styles for the navigation arrows on the main image */
.image-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--brand-dark);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hide arrows by default */
    pointer-events: none;
}

/* Show arrows when hovering over the image container */
.main-image-wrapper:hover .image-nav-arrow {
    opacity: 1;
    pointer-events: auto;
}

.image-nav-arrow:hover {
    background-color: white;
    color: var(--brand-accent);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
}

.image-nav-arrow.left-4 {
    left: 1rem;
}

.image-nav-arrow.right-4 {
    right: 1rem;
}

/* --- PRODUCT PAGE STYLE FIXES --- */

/* Aligns the "Size" label to the left */
#size-options > .subheading {
    display: block; /* Ensures it's on its own line */
    width: 100%;   /* Takes the full width to align text within it */
    text-align: left;
}
/* --- DEFINITIVE THUMBNAIL FIX --- */

.thumbnail-image {
    display: block;
    width: 80px;
    height: 80px;
    padding: 4px;
    background-color: white;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    /* This !important rule will force the browser to apply the style */
    object-fit: contain !important;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: var(--brand-accent);
    transform: scale(1.05);
}
/* --- CHECKOUT PAGE STYLING (Corrected) --- */

.checkout-page .form-group {
    margin-bottom: 0;
}

.checkout-page .form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-text);
    margin-bottom: 0.5rem;
    display: block;
}

/* General styles for all form inputs/selects */
.checkout-page .form-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

/* Remove custom arrow from TEXT inputs */
.checkout-page input.form-input {
    background-image: none;
}

/* Restore native appearance for SELECT dropdowns to ensure they are visible */
.checkout-page select.form-input {
    appearance: auto;
    background-image: none;
    padding-right: 1rem; /* Reset padding */
}

.checkout-page .form-input:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(229, 164, 78, 0.2);
}

.checkout-page .form-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Styles for the phone number input library */
.iti {
    width: 100%;
}
.iti__flag-container {
    border-right: 1px solid #d1d5db;
}

/* Layout styles */
.checkout-summary-section { padding: 4rem 2rem; }
.summary-container { width: 100%; max-width: 450px; margin: 2rem auto; }
.summary-divider { height: 1px; background-color: rgba(0,0,0,0.1); margin: 1.5rem 0; }


/* --- COMPREHENSIVE RESPONSIVE STYLES --- */

/* For small mobile devices (e.g., iPhone 5/SE) */
@media (max-width: 380px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .shop-title {
        font-size: 2rem;
    }

    .product-details {
        padding: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    #main-header {
        padding: 1rem 1.5rem;
    }

    .checkout-form-section, .checkout-summary-section {
        padding: 2rem 1rem;
    }
}

/* For standard mobile devices */
@media (max-width: 639px) {
    .nav-link, .cart-button {
        display: none; /* Hides nav links on mobile; you would need a JavaScript-driven mobile menu to show them */
    }

    #main-header .flex.items-center.justify-between {
        justify-content: center; /* Centers the logo when nav links are hidden */
    }

    .hero-section {
        padding-top: 8rem;
        text-align: center;
    }

    .hero-text-content .btn {
        margin: 0 auto;
    }

    .hero-media-grid {
        display: none; /* Hides the media grid on small screens for a simpler layout */
    }

    .values-grid, .collection-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        text-align: center;
    }

    .footer-link {
        margin: 0.5rem 1rem;
    }

    .checkout-layout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary-section {
        border-top: 1px solid rgba(0,0,0,0.1);
    }
}

/* For tablets and small desktops */
@media (min-width: 640px) and (max-width: 1023px) {
    .container {
        max-width: 90%;
    }

    .hero-title {
        font-size: 4rem;
    }

    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    /* Stack product gallery and details on tablets */
    .product-page-main .grid.lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* For large desktops */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2.5rem;
    }
}

/* For extra large desktops */
@media (min-width: 1536px) {
    .container {
        max-width: 1440px;
    }

    .hero-title {
        font-size: 6rem;
    }

    .collection-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- RESPONSIVE UTILITY CLASSES --- */

/* Hide element on screens smaller than a specific breakpoint */
@media (max-width: 639px) { .hide-on-mobile { display: none; } }
@media (max-width: 767px) { .hide-on-tablet { display: none; } }
@media (max-width: 1023px) { .hide-on-desktop { display: none; } }

/* Show element only on screens larger than a specific breakpoint */
.show-on-mobile, .show-on-tablet, .show-on-desktop { display: none; }
@media (max-width: 639px) { .show-on-mobile { display: block; } }
@media (min-width: 640px) and (max-width: 1023px) { .show-on-tablet { display: block; } }
@media (min-width: 1024px) { .show-on-desktop { display: block; } }
/* --- MOBILE NAVIGATION STYLES --- */
.mobile-nav-link {
    display: block;
    padding: 1rem;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--brand-dark);
    text-align: center;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--brand-accent);
}

/* --- GRID RESPONSIVENESS FIXES --- */

/* For Tablets */
@media (max-width: 1023px) {
    .hero-media-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .media-item-1, .media-item-2, .media-item-3 {
        grid-row: auto;
        grid-column: auto;
        height: 300px;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* For Mobile Devices */
@media (max-width: 767px) {
    /* Hide desktop nav and show hamburger */
    #main-header .hidden.md\\:flex {
        display: none;
    }
    
    #hamburger-button {
        display: block;
    }

    .hero-media-grid {
        display: none; /* Hides the grid on small mobile for a cleaner look */
    }
}
/* --- MOBILE NAVIGATION & RESPONSIVE FIXES --- */

/* Styles for the links inside the mobile menu */
.mobile-nav-link {
    display: block;
    padding: 1rem;
    font-size: 1.75rem; /* Larger font for mobile */
    font-family: var(--font-heading);
    color: var(--brand-dark);
    text-align: center;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--brand-accent);
}

/* On tablets and smaller devices (< 768px) */
@media (max-width: 767px) {
    /* Hide the desktop navigation links */
    #main-header .hidden.md\\:flex {
        display: none;
    }
    
    /* Show the hamburger button */
    #hamburger-button {
        display: block;
    }

    /* Hero section grid fix for tablets */
    .hero-media-grid {
        grid-template-columns: 1fr; /* Stack the items in a single column */
        height: auto;
        gap: 1rem;
    }
    
    .media-item-1, .media-item-2, .media-item-3 {
        grid-row: auto; /* Reset grid placement */
        grid-column: auto;
        height: 300px; /* Give them a consistent height */
    }

    /* Core values grid fix */
    .values-grid {
        grid-template-columns: 1fr; /* Stack into a single column */
        gap: 2rem;
    }
}

/* On small mobile phones (< 640px) */
@media (max-width: 639px) {
    /* Center the logo since the nav links are gone */
    #main-header .flex.items-center.justify-between {
        justify-content: space-between;
    }
    
    /* Hide the hero image grid completely on very small screens */
    .hero-media-grid {
        display: none; 
    }
}
/* --- CORRECTED RESPONSIVE HEADER STYLES --- */

/* For tablets and mobile devices (screens smaller than 768px) */
@media (max-width: 767px) {
    /* Hide the container for the desktop navigation links */
    #main-header .hidden.md\\:flex {
        display: none;
    }

    /* Ensure the hamburger button is visible */
    #hamburger-button {
        display: block;
    }

    /* Adjust header padding for smaller screens */
    #main-header {
        padding: 1rem 1.5rem;
    }

    /* --- Grid and Layout Fixes for this size --- */
    
    .hero-section .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-text-content {
        margin: 0 auto;
    }
    
    .hero-media-grid {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }

    .media-item-1, .media-item-2, .media-item-3 {
        grid-row: auto;
        grid-column: auto;
        height: 300px;
    }

    .values-grid,
    #our-promise .grid,
    .core-values-section .grid {
        grid-template-columns: 1fr;
    }
}

/* For small mobile phones (screens smaller than 640px) */
@media (max-width: 639px) {
    /* Optional: Hide the hero image grid on very small screens for a cleaner look */
    .hero-media-grid {
        display: none;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    #collection-grid {
        grid-template-columns: 1fr;
    }
    
    #cart-panel {
        max-width: 100%;
    }
}