﻿:root {
  --primary: #004b87;
  --secondary: #0085a1;
  --accent: #00a8b5;
  --bg-light: #f4f8fb;
  --bg-white: #ffffff;
  --text-dark: #192a3e;
  --text-muted: #5e6d82;
  --border: #d6e2ec;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }

/* Clinical Header */
.clinical-header { background: #fff; border-bottom: 2px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.clinical-header .container { max-width: 1220px; }
.header-wrap { display: flex; justify-content: space-between; align-items: center; min-height: 75px; gap: 16px; flex-wrap: nowrap; }
.clin-logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; color: var(--primary); flex-shrink: 0; white-space: nowrap; }
.clin-cross { width: 32px; height: 32px; background: var(--primary); color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: bold; flex-shrink: 0; }
.clin-nav { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.clin-nav a {
  padding: 8px 14px; border-radius: 6px; font-weight: 700; font-size: 0.92rem;
  color: var(--text-dark); transition: all 0.2s ease; white-space: nowrap; text-decoration: none;
}
.clin-nav a:hover { color: var(--primary); background: #eef6fc; text-decoration: none; }
.clin-nav a.active { color: var(--primary); background: #e1effa; border-bottom: 2px solid var(--primary); font-weight: 800; }

/* Shopping Cart Button */
.clin-cart-btn {
  display: flex; align-items: center; gap: 8px; background: #eef6fc;
  border: 1.5px solid var(--border); color: var(--primary); padding: 8px 16px;
  border-radius: 24px; font-weight: 800; font-size: 0.88rem; cursor: pointer;
  transition: all 0.2s ease; white-space: nowrap; text-decoration: none; flex-shrink: 0;
}
.clin-cart-btn:hover {
  background: #e1effa; border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 75, 135, 0.12);
  text-decoration: none;
}
.cart-badge {
  background: #d9381e; color: #fff; font-size: 0.72rem; font-weight: 900;
  width: 20px; height: 20px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; margin-left: 2px;
}

/* Cart Drawer / Slide-in */
.cart-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0, 30, 60, 0.6); backdrop-filter: blur(3px);
  z-index: 1000; display: none; justify-content: flex-end;
}
.cart-drawer-overlay.active { display: flex; }
.cart-drawer {
  background: #ffffff; width: 100%; max-width: 440px; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: -5px 0 25px rgba(0,0,0,0.2); animation: slideIn 0.25s ease forwards;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.cart-drawer-head {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; background: #f8fafc;
}
.cart-drawer-body { padding: 24px; overflow-y: auto; flex-grow: 1; }
.cart-drawer-foot { padding: 20px 24px; border-top: 1px solid var(--border); background: #f8fafc; }

.btn-med {
  background: var(--primary); color: #fff; font-weight: 700; padding: 10px 22px; border-radius: 6px;
  display: inline-block; transition: 0.2s; border: none; cursor: pointer; text-decoration: none;
}
.btn-med:hover { background: #003666; color: #fff; text-decoration: none; }

/* Clinical Hero */
.clin-hero { background: #fff; padding: 50px 0; border-bottom: 1px solid var(--border); }
.hero-flex { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.med-badge {
  display: inline-block; background: #e6f3fa; color: var(--primary); font-size: 0.8rem; font-weight: 800;
  padding: 4px 12px; border-radius: 4px; border: 1px solid #c0deed; margin-bottom: 16px;
}
.clin-title { font-size: 2.6rem; color: var(--primary); font-weight: 900; line-height: 1.2; margin-bottom: 16px; }
.bottle-frame { text-align: center; background: var(--bg-light); padding: 30px; border-radius: var(--radius); border: 1px solid var(--border); }
.bottle-frame img { max-height: 420px; object-fit: contain; margin: 0 auto; }

/* Doctor Intro Box */
.doctor-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; margin: 40px 0; display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: center; }
.doc-photo { width: 100%; border-radius: var(--radius); border: 2px solid #e1ebf2; }

/* Scientific Data Cards */
.study-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0; }
.study-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; border-top: 4px solid var(--primary); }
.study-num { font-size: 2rem; font-weight: 900; color: var(--secondary); margin-bottom: 6px; }

/* IPSS 7-Question Form */
.ipss-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; margin: 30px 0; }
.ipss-q { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #edf2f7; }
.ipss-q-title { font-weight: 700; font-size: 1.05rem; color: var(--primary); margin-bottom: 12px; }
.ipss-opts { display: flex; flex-direction: column; gap: 8px; }
.ipss-opt { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; cursor: pointer; }

/* Prescription Result */
.rx-card {
  background: #fdfefe; border: 2px dashed var(--secondary); border-radius: var(--radius);
  padding: 30px; margin-top: 30px; display: none;
}

/* Order Form */
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.input-field { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 14px; }

@media(max-width: 950px) {
  .header-wrap { flex-wrap: nowrap; height: auto; padding: 12px 0; gap: 12px; }
  .clin-nav {
    order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .clin-nav a { font-size: 0.85rem; padding: 6px 12px; }
}

@media(max-width: 768px) {
  .hero-flex, .doctor-box, .study-grid, .order-grid { grid-template-columns: 1fr; }
}

/* Additional Rich Components for ProstAktiv Clinical */
.clin-section-title { font-size: 2.2rem; color: var(--primary); font-weight: 900; text-align: center; margin-bottom: 12px; }
.clin-section-desc { color: var(--text-muted); font-size: 1.05rem; text-align: center; max-width: 750px; margin: 0 auto 35px; }

.clin-ingr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.clin-ingr-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; border-left: 4px solid var(--secondary); transition: 0.2s; }
.clin-ingr-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0, 75, 135, 0.08); border-color: var(--primary); }
.clin-ingr-card h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 8px; }
.clin-ingr-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

.clin-table-wrap { overflow-x: auto; margin-top: 30px; }
.clin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.clin-table th, .clin-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.clin-table th { background: #eef6fc; color: var(--primary); font-weight: 800; }
.clin-table th.highlight, .clin-table td.highlight { background: #e6f3fa; border-left: 2px solid var(--secondary); border-right: 2px solid var(--secondary); font-weight: 700; color: var(--primary); }

.clin-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.clin-timeline-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.clin-timeline-badge { background: var(--secondary); color: #fff; font-weight: 800; font-size: 0.8rem; padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 12px; }

.clin-case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; }
.clin-case-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; border-top: 3px solid var(--primary); }

.clin-faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.clin-faq-q { width: 100%; padding: 18px 22px; background: none; border: none; text-align: left; font-size: 1.02rem; font-weight: 700; color: var(--primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.clin-faq-a { padding: 0 22px 18px; font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; display: none; }
.clin-faq-item.active .clin-faq-a { display: block; }
.clin-faq-item.active .clin-faq-toggle { transform: rotate(45deg); color: var(--secondary); }

@media(max-width: 850px) {
  .clin-ingr-grid, .clin-timeline, .clin-case-grid { grid-template-columns: 1fr; }
}

/* Official Order Confirmation Modal */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 30, 60, 0.75) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  padding: 20px !important;
  backdrop-filter: blur(4px) !important;
}
.modal-overlay.active {
  display: flex !important;
}
.modal-content {
  background: #ffffff !important;
  border: 2px solid var(--primary) !important;
  border-radius: 12px !important;
  max-width: 520px !important;
  width: 100% !important;
  padding: 36px 28px !important;
  text-align: center !important;
  box-shadow: 0 20px 50px rgba(0, 43, 84, 0.35) !important;
  position: relative !important;
}
