/* Shared spacing and type scale. Keep behavior in the existing page scripts. */
:root {
  --page-gutter: clamp(20px, 4vw, 60px);
  --section-space: clamp(40px, 6vw, 80px);
  --card-space: clamp(16px, 2.5vw, 32px);
}

html { scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
.driivo-cart-layout > *, .driivo-checkout-layout > *,
.driivo-product-main > *, .footer-top > *, .scents-grid > * { min-width: 0; }
.driivo-cart-page, .driivo-checkout-page, .driivo-product-page,
.driivo-shop-page, .driivo-order-received-page {
  padding-inline: var(--page-gutter);
}
.about-content, .driivo-accessories, .story-journey, .story-values,
.story-behind, .legal-body, .footer-top {
  padding-block: var(--section-space);
  padding-inline: var(--page-gutter);
}
.about-title, .accessories-title, .story-section-title {
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.2;
}
.hero-desc, .about-text, .story-hero-desc, .legal-section-content {
  line-height: 1.75;
}
.driivo-product-summary .product_title, .driivo-cart-title {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  .driivo-hamburger { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .driivo-checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .driivo-checkout-details { padding: var(--card-space); }
}

@media (max-width: 768px) {
  :root { --page-gutter: 20px; --section-space: 40px; --card-space: 20px; }
  .driivo-cart-page, .driivo-checkout-page, .driivo-product-page,
  .driivo-shop-page, .driivo-order-received-page {
    padding-top: 100px;
    padding-bottom: var(--section-space);
  }
  .driivo-account-page { padding-top: 100px; padding-bottom: var(--section-space); }
  .driivo-login-card, .driivo-login-intro { width: calc(100% - 2 * var(--page-gutter)); }
  .driivo-login-card, .driivo-order-summary, .driivo-checkout-details,
  .driivo-order-card { padding: var(--card-space); }
  .hero-content, .story-hero-content { padding-inline: var(--page-gutter); }
  .legal-hero-content { padding: 112px var(--page-gutter) var(--section-space); }
  .legal-nav-inner, .footer-bottom { padding-inline: var(--page-gutter); }
  .scents-grid { padding-inline: var(--page-gutter); gap: 24px; }
  .hero-actions { flex-wrap: wrap; gap: 12px; }
  .hero-actions > a { flex: 1 1 180px; text-align: center; }
  .driivo-shop-hero h1 { font-size: clamp(34px, 9vw, 48px); line-height: 1.15; letter-spacing: -1px; }
  .driivo-login-intro h1 { font-size: clamp(28px, 7vw, 36px); line-height: 1.25; }
  .driivo-shop-results { padding: 16px 0; }
  .driivo-shop-results ul.products { gap: 16px 12px; }
  .driivo-shop-results ul.products li.product .driivo-product-details h2,
  .driivo-shop-results .driivo-product-price { font-size: 14px; line-height: 1.5; }
  .driivo-shop-results .driivo-product-actions .button { font-size: 13px !important; white-space: normal; }
  .driivo-shop-toolbar, .driivo-shop-toolbar > div,
  .driivo-shop-toolbar .woocommerce-ordering { width: 100%; }
  .driivo-shop-toolbar select { min-height: 44px; }
  .driivo-login-card input:not([type="checkbox"]):not([type="radio"]),
  .driivo-account-content input.input-text, .driivo-account-content select,
  .driivo-account-content textarea, .driivo-filter-card .search-field {
    font-size: 16px;
  }
  .driivo-login-eyebrow { letter-spacing: 3px; gap: 12px; }
  .driivo-product-tabs ul.tabs li a { min-height: 44px; }
  .driivo-product-tabs table { width: 100%; table-layout: fixed; overflow-wrap: anywhere; }
  .driivo-order-actions, .driivo-login-options { flex-wrap: wrap; gap: 12px; }
  .driivo-order-actions > a { min-height: 44px; white-space: normal; }
  .driivo-mobile-menu { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

/* Let cards breathe on narrow phones instead of shrinking their text. */
@media (max-width: 360px) {
  :root { --page-gutter: 16px; --card-space: 16px; }
  .driivo-shop-results ul.products { grid-template-columns: minmax(0, 1fr); }
  .about-features, .accessories-grid { grid-template-columns: minmax(0, 1fr); }
}
