/* ===== DermVita — Clinical & Professional Stylesheet ===== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  --white: #ffffff;
  --off-white: #faf9f7;
  --cream: #f5f0eb;
  --sage-light: #d4ddd2;
  --sage: #8a9f86;
  --sage-dark: #6b7f67;
  --brown-light: #c4a882;
  --brown: #9c7f5c;
  --brown-dark: #7a6245;
  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --border: #e5e0da;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--off-white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brown); }
ul, ol { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1em; color: var(--text-secondary); }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 12px;
  display: inline-block;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--sage-dark);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--brown-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage-dark);
}
.btn-outline:hover {
  background: var(--sage-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--transition);
}
.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* --- Header / Navbar --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.logo span { color: var(--sage-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--sage-dark);
  transition: width var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 1100;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
  position: absolute;
  left: 0;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

/* --- Hero Section --- */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(168deg, var(--off-white) 0%, var(--cream) 50%, var(--sage-light) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(138,159,134,0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content { position: relative; z-index: 2; }

.hero-content h1 {
  margin-bottom: 20px;
}
.hero-content h1 em {
  font-style: italic;
  color: var(--sage-dark);
}

.hero-content .lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 440px;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-height: 480px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
  animation: float 6s ease-in-out infinite;
}

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

/* --- Trust Badges --- */
.trust-strip {
  padding: 60px 0;
  background: var(--white);
}

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

.trust-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-md);
  background: var(--off-white);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.trust-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sage-light);
}

.trust-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.trust-card h4 { margin-bottom: 8px; }
.trust-card p { font-size: 0.9rem; margin-bottom: 0; }

/* --- Sections --- */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--white);
}
.section-cream {
  background: var(--cream);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--text-muted); }

/* --- Product Page --- */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-gallery {
  position: sticky;
  top: 96px;
}

.gallery-main {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--cream);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.gallery-main img {
  max-height: 100%;
  object-fit: contain;
  padding: 24px;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
}
.gallery-thumbs .thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
}
.gallery-thumbs .thumb.active,
.gallery-thumbs .thumb:hover {
  border-color: var(--sage-dark);
}
.gallery-thumbs .thumb img {
  max-height: 100%;
  object-fit: contain;
  padding: 4px;
}

.product-info h1 { margin-bottom: 8px; }

.product-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sage-dark);
  margin-bottom: 24px;
}

.product-desc { margin-bottom: 32px; }

.detail-block {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.detail-block:last-of-type { border-bottom: none; }
.detail-block h3 { margin-bottom: 12px; }
.detail-block ul { padding-left: 0; }
.detail-block ul li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.detail-block ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 700;
}

/* --- Order Form --- */
.order-form-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-top: 32px;
  box-shadow: var(--shadow-sm);
}

.order-form-wrapper h3 {
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(138,159,134,0.15);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 1rem;
  margin-top: 8px;
}

/* --- Ingredients Page --- */
.ingredients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.ingredient-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all var(--transition);
}
.ingredient-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.ingredient-card .ing-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-light), var(--cream));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
}
.ingredient-card h4 { margin-bottom: 8px; }
.ingredient-card p { font-size: 0.9rem; margin-bottom: 0; }

/* --- About Page --- */
.about-hero {
  padding: 80px 0;
  background: linear-gradient(160deg, var(--cream) 0%, var(--sage-light) 100%);
  text-align: center;
}
.about-hero h1 { margin-bottom: 16px; }
.about-hero p { max-width: 560px; margin: 0 auto; }

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

.value-card {
  text-align: center;
  padding: 40px 24px;
}
.value-card .val-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--sage-light);
  line-height: 1;
  margin-bottom: 16px;
}
.value-card h3 { margin-bottom: 10px; }
.value-card p { font-size: 0.9rem; margin-bottom: 0; }

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

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 40px 20px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}
.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--sage);
  transition: transform var(--transition);
}
.faq-item.open .faq-question::after {
  content: '−';
}
.faq-question:hover { color: var(--sage-dark); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 400px;
  padding-bottom: 20px;
}
.faq-answer p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info-card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 40px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.contact-item:last-child { margin-bottom: 0; }

.contact-item .ci-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-item h4 { margin-bottom: 4px; font-size: 0.95rem; }
.contact-item p { font-size: 0.9rem; margin-bottom: 0; }
.contact-item a { color: var(--sage-dark); font-weight: 500; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px;
}
.contact-form h3 { margin-bottom: 24px; }

/* --- Success Page --- */
.success-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.success-box {
  max-width: 520px;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--sage-light);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  animation: scaleIn 0.5s ease;
}
@keyframes scaleIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-box h1 { margin-bottom: 16px; }
.success-box p { margin-bottom: 28px; }

/* --- Footer --- */
.site-footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col .logo {
  color: var(--white);
  margin-bottom: 12px;
  display: inline-block;
}
.footer-col p { color: rgba(255,255,255,0.55); font-size: 0.88rem; }
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }

.footer-contact-item {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
}
.footer-contact-item a { color: rgba(255,255,255,0.6); }
.footer-contact-item a:hover { color: var(--white); }

.medical-disclaimer {
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 32px;
}
.medical-disclaimer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-bottom: 0;
  line-height: 1.6;
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0;
}
.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.8); }

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  padding: 20px 24px;
  display: none;
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-inner p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  flex: 1;
  min-width: 260px;
}
.cookie-inner p a { text-decoration: underline; }
.cookie-btns {
  display: flex;
  gap: 12px;
}
.cookie-btns .btn { padding: 10px 24px; font-size: 0.85rem; }

/* --- Legal Pages --- */
.legal-page {
  padding: 60px 0 80px;
}
.legal-page .container { max-width: 760px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-page .legal-date { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 40px; }
.legal-page h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.legal-page p, .legal-page li { font-size: 0.95rem; }
.legal-page ul { padding-left: 20px; margin-bottom: 16px; }
.legal-page ul li { padding: 4px 0; color: var(--text-secondary); list-style: disc; }

/* --- Responsive --- */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content .lead { margin: 0 auto 32px; }
  .hero-image img { max-height: 360px; }
  .product-layout { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250,249,247,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 1050;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.2rem; }
  .menu-toggle { display: block; }

  .trust-grid { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 40px; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .cookie-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .order-form-wrapper { padding: 24px 16px; }
}

/* --- Date badge --- */
.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 4px 12px;
  background: rgba(138,159,134,0.1);
  border-radius: 20px;
}

/* --- Page banner --- */
.page-banner {
  padding: 48px 0;
  background: linear-gradient(160deg, var(--cream) 0%, var(--sage-light) 100%);
  text-align: center;
}
.page-banner h1 { margin-bottom: 8px; }
.page-banner p { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-dark);
  color: var(--white);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
  z-index: 100;
  transition: all var(--transition);
}
.back-to-top:hover {
  background: var(--brown-dark);
  transform: translateY(-2px);
}
.back-to-top.visible { display: flex; }
