/* ===== CSS Custom Properties ===== */
:root {
    --primary: #2A5C3E;
    --primary-dark: #1E4530;
    --primary-light: #3D7A54;
    --accent: #1D9B8E;
    --accent-light: #e8f5f3;
    --sand: #F5F0E1;
    --white: #ffffff;
    --bg: #f9faf7;
    --text: #1a1a1a;
    --text-light: #5a6b5e;
    --border: #d9e0d5;
    --border-light: #e8ede5;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Typography ===== */
h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; color: var(--primary-dark); }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.3; color: var(--primary); }
h3 { font-size: 1.3rem; font-weight: 600; color: var(--text); }
h4 { font-size: 1.1rem; font-weight: 600; }
.section-title { text-align: center; margin-bottom: 3rem; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600;
    font-size: 15px; cursor: pointer; transition: all 0.2s;
    border: 2px solid transparent; font-family: var(--font);
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(42,92,62,0.3); }
.btn--white { background: #fff; color: var(--primary); }
.btn--white:hover { background: #f0f0f0; }
.btn--outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--outline-light { border-color: rgba(255,255,255,0.5); color: #fff; background: transparent; }
.btn--outline-light:hover { background: rgba(255,255,255,0.1); }
.btn--full { width: 100%; justify-content: center; }
.btn--sm { padding: 8px 18px; font-size: 13px; }
.btn__arrow { font-size: 18px; }

/* ===== Header ===== */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; z-index: 100;
}
.header__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 70px; gap: 20px;
}
.header__logo {
    display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.header__logo-icon { display: flex; align-items: center; }
.header__logo-text {
    font-weight: 700; font-size: 18px; color: var(--primary);
    white-space: nowrap;
}
.header__menu-wrapper { position: relative; display: flex; align-items: center; }
.header__nav {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff; flex-direction: column; padding: 0.75rem;
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    z-index: 100; min-width: 200px; border: 1px solid var(--border-light);
}
.header__nav--open { display: flex; }
.header__nav-link {
    padding: 8px 14px; border-radius: 6px; font-size: 14px;
    font-weight: 500; color: var(--text-light); transition: all 0.15s;
    white-space: nowrap;
}
.header__nav-link:hover { background: var(--accent-light); color: var(--accent); }
.header__nav-link--active { color: var(--primary); font-weight: 600; background: rgba(42,92,62,0.08); }
.header__nav-link--admin { color: var(--accent); font-weight: 600; }
.header__nav-link--logout { color: #d4183d; }

.header__burger {
    display: flex; flex-direction: column; gap: 5px; background: none;
    border: none; cursor: pointer; padding: 4px; z-index: 101;
}
.header__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
/* Burger animation when menu open */
.header__burger--open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.header__burger--open span:nth-child(2) { opacity: 0; }
.header__burger--open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Hero ===== */
.hero {
    position: relative; height: 850px; display: flex; align-items: center;
    justify-content: center; overflow: hidden;
}
.hero__bg {
    position: absolute; inset: 0; background-size: cover; background-position: initial;
}
.hero__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(42,92,62,0.85) 0%, rgba(29,155,142,0.6) 100%);
}
.hero__content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 20px; }
.hero__title { font-size: 3.5rem; font-weight: 800; color: #fff; margin-bottom: 1rem; }
.hero__subtitle { font-size: 1.3rem; opacity: 0.95; max-width: 700px; margin: 0 auto 2rem; line-height: 1.6; }

/* ===== Page Hero ===== */
.page-hero {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 4rem 0; text-align: center; color: #fff;
}
.page-hero h1 { color: #fff; }
.page-hero__subtitle { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 1rem auto 0; }

/* ===== Features ===== */
.features { padding: 4rem 0; }
.features__grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.feature-card {
    text-align: center; padding: 2rem; background: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card__icon {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; font-size: 28px;
}
.feature-card__title { margin-bottom: 0.5rem; }
.feature-card__text { color: var(--text-light); font-size: 15px; }

/* ===== About Preview ===== */
.about-preview { padding: 4rem 0; background: #fff; }
.about-preview__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.about-preview__img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; height: 400px; object-fit: cover; }
.about-preview__content h2 { margin-bottom: 1rem; }
.about-preview__content p { color: var(--text-light); margin-bottom: 1rem; font-size: 1.05rem; }

/* ===== Reviews (page only) ===== */
.review-card {
    background: #fff; border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--shadow); border: 1px solid var(--border-light);
}
.review-card--full { margin-bottom: 1rem; }
.review-card__stars { margin-bottom: 0.75rem; font-size: 18px; }
.review-card__text { font-style: italic; color: var(--text); margin-bottom: 1rem; line-height: 1.7; }
.review-card__author { border-top: 1px solid var(--border-light); padding-top: 1rem; }
.review-card__author strong { display: block; color: var(--text); }
.review-card__author span { color: var(--text-light); font-size: 14px; }

/* ===== Catalog ===== */
.catalog { padding: 3rem 0; }
.catalog__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.catalog-card {
    background: #fff; border-radius: var(--radius); padding: 1.75rem;
    border: 2px solid var(--border-light); transition: all 0.2s;
    display: block;
}
.catalog-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.catalog-card--disabled { opacity: 0.6; cursor: not-allowed; }
.catalog-card--disabled:hover { border-color: var(--border-light); box-shadow: none; transform: none; }
.catalog-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.catalog-card__title { font-size: 1.2rem; margin-bottom: 4px; }
.catalog-card__category { font-size: 13px; color: var(--text-light); }
.catalog-card__desc { color: var(--text-light); font-size: 14px; line-height: 1.6; }
.catalog-card__arrow { font-size: 20px; color: var(--primary); opacity: 0; transition: opacity 0.2s; }
.catalog-card:hover .catalog-card__arrow { opacity: 1; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge--soon { background: #f0f0f0; color: #888; }
.badge--category { background: rgba(42,92,62,0.1); color: var(--primary); margin-bottom: 0.75rem; }

/* ===== Product Detail ===== */
.product-detail { padding: 3rem 0; }
.product-detail__back { display: inline-block; color: var(--primary); font-weight: 500; margin-bottom: 1.5rem; }
.product-detail__back:hover { text-decoration: underline; }
.product-detail__card { background: #fff; border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); }
.product-detail__title { font-size: 2rem; margin-bottom: 0.75rem; }
.product-detail__intro { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2rem; }
.product-detail__section { margin-bottom: 2rem; }
.product-detail__section h3 { color: var(--primary); margin-bottom: 0.75rem; font-size: 1.2rem; }
.product-detail__text { color: var(--text-light); line-height: 1.7; }
.product-detail__text--highlight { background: #f8fdf9; padding: 1rem 1.25rem; border-radius: var(--radius-sm); border-left: 3px solid var(--primary); }
.product-detail__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-light); }
.benefits__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.benefit-item { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 15px; }
.benefit-item__icon { flex-shrink: 0; color: var(--primary); }
.dosage-table-wrap { overflow-x: auto; }
.dosage-table { width: 100%; border-collapse: collapse; border-radius: var(--radius-sm); overflow: hidden; }
.dosage-table th { background: var(--primary); color: #fff; padding: 12px 16px; text-align: left; font-size: 14px; }
.dosage-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); font-size: 15px; }
.dosage-table tr:hover td { background: #f8fdf9; }
.dosage-table td:last-child { font-weight: 600; color: var(--primary); }

/* ===== About ===== */
.about { padding: 3rem 0; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; margin-bottom: 3rem; }
.about__text h2 { margin-bottom: 1rem; margin-top: 1.5rem; }
.about__text p { color: var(--text-light); margin-bottom: 1rem; }
.about__img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 400px; object-fit: cover; }
.facts { padding: 3rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 2rem; }
.facts__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.fact-card { text-align: center; }
.fact-card__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.fact-card__number { font-size: 2.5rem; font-weight: 800; color: var(--primary); margin-bottom: 0.25rem; }
.fact-card__label { color: var(--text-light); font-size: 15px; }

/* ===== Certificates ===== */
.certificates { padding: 3rem 0; }
.certificates__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.cert-card {
    position: relative; background: #fff; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cert-card__img { width: 100%; height: 240px; object-fit: cover; }
.cert-card__title { padding: 0.75rem 1rem; font-size: 14px; text-align: center; color: var(--text-light); }
.cert-card__delete {
    width: 28px; height: 28px; border-radius: 50%; background: #d4183d;
    color: #fff; border: none; cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}

/* ===== Partners ===== */
.partners { padding: 3rem 0; }
.partners__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.partner-card {
    background: #fff; border-radius: var(--radius); padding: 2rem;
    text-align: center; border: 1px solid var(--border-light);
    transition: all 0.2s; box-shadow: var(--shadow);
}
.partner-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.partner-card__logo {
    width: 72px; height: 72px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; font-size: 1.5rem; font-weight: 700; color: #fff;
}
.partner-card__name { color: var(--text-light); font-size: 14px; }

/* ===== Contacts ===== */
.contacts { padding: 3rem 0; }
.contacts__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; align-items: start; }
.contacts__form-card {
    background: #fff; border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.contacts__form-card h3 { margin-bottom: 0.5rem; }
.contacts__form-card > p { color: var(--text-light); margin-bottom: 1.5rem; }
.contact-item {
    display: flex; gap: 1rem; background: #fff; padding: 1rem 1.25rem;
    border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-bottom: 0.75rem;
}
.contact-item__icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-item h4 { font-size: 0.95rem; margin-bottom: 2px; }
.contact-item p { color: var(--text-light); font-size: 14px; }
.contacts__map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* ===== Forms ===== */
.form { }
.form__group { margin-bottom: 1rem; }
.form__label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: var(--text); }
.form__input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font);
    transition: border-color 0.2s; outline: none; background: #fff;
}
.form__input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(42,92,62,0.1); }
.form__textarea { resize: vertical; min-height: 100px; }
.form--review { max-width: 500px; margin: 0 auto; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 14px; }
.alert--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert--error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== News ===== */
.news { padding: 3rem 0; }
.news__list { display: flex; flex-direction: column; gap: 1.5rem; max-width: 850px; margin: 0 auto; }
.news-card {
    display: grid; grid-template-columns: 280px 1fr; background: #fff;
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: var(--shadow-lg); }
.news-card__img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.news-card__body { padding: 1.5rem 2rem; }
.news-card__date { font-size: 13px; color: var(--text-light); display: block; margin-bottom: 0.5rem; }
.news-card__title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.news-card__excerpt { color: var(--text-light); font-size: 15px; margin-bottom: 1rem; }

/* ===== News Detail ===== */
.news-detail { padding: 3rem 0; }
.news-detail__article { max-width: 800px; margin: 0 auto; }
.news-detail__hero { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.news-detail__date { font-size: 14px; color: var(--text-light); display: block; margin-bottom: 0.5rem; }
.news-detail__content { color: var(--text); line-height: 1.8; }
.news-detail__content h3 { margin: 1.5rem 0 0.75rem; color: var(--primary); }
.news-detail__content p { margin-bottom: 1rem; }
.news-detail__content ul { margin: 0.5rem 0 1rem 1.5rem; }
.news-detail__content li { margin-bottom: 0.5rem; }

/* ===== FAQ ===== */
.faq { padding: 3rem 0; }
.faq__list { max-width: 750px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    border: 1px solid var(--border-light); overflow: hidden;
}
.faq-item__question {
    width: 100%; padding: 1.25rem 1.5rem; background: none; border: none;
    text-align: left; font-size: 16px; font-weight: 600; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font); color: var(--text);
}
.faq-item__question:hover { background: #f8fdf9; }
.faq-item__icon { transition: transform 0.3s; color: var(--primary); }
.faq-item__question[aria-expanded="true"] .faq-item__icon { transform: rotate(180deg); }
.faq-item__answer {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}
.faq-item__answer--open { max-height: 300px; padding: 0 1.5rem 1.25rem; }
.faq-item__answer p { color: var(--text-light); line-height: 1.7; }

/* ===== Reviews Page ===== */
.reviews-page { padding: 3rem 0; }
.reviews-page__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.review-form-section {
    text-align: center; background: #fff; border-radius: var(--radius);
    padding: 2.5rem; box-shadow: var(--shadow); max-width: 600px; margin: 0 auto;
    border: 2px solid var(--accent-light);
}
.review-form-section h3 { margin-bottom: 0.5rem; }
.review-form-section > p { color: var(--text-light); margin-bottom: 1.5rem; }

/* ===== Footer ===== */
.footer { background: var(--primary); color: #fff; padding-top: 3rem; }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer__title { color: #fff; margin-bottom: 0.75rem; }
.footer__subtitle { color: rgba(255,255,255,0.9); margin-bottom: 0.75rem; }
.footer__text { color: rgba(255,255,255,0.75); font-size: 14px; line-height: 1.6; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 6px; }
.footer__links a { color: rgba(255,255,255,0.75); font-size: 14px; transition: color 0.15s; }
.footer__links a:hover { color: #fff; }
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 2rem; padding: 1.5rem 0; text-align: center;
    color: rgba(255,255,255,0.6); font-size: 14px;
}

/* ===== Modal ===== */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.modal--open { display: block; }
.modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal__content {
    position: relative; z-index: 2; background: #fff; border-radius: var(--radius);
    padding: 2rem; max-width: 450px; width: 90%; margin: 100px auto 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal__close {
    position: absolute; top: 12px; right: 16px; background: none;
    border: none; font-size: 24px; cursor: pointer; color: var(--text-light);
}
.modal__title { margin-bottom: 1.5rem; }

/* ===== Admin Login ===== */
.admin-login-page { background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.admin-login__card {
    background: #fff; border-radius: var(--radius); padding: 2.5rem;
    box-shadow: var(--shadow-lg); max-width: 400px; width: 100%;
}
.admin-login__card h2 { margin-bottom: 1.5rem; text-align: center; }
.admin-login__hint { text-align: center; margin-top: 1rem; font-size: 13px; color: var(--text-light); }
.admin-login__hint code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; }
.admin-login__back { display: block; text-align: center; margin-top: 1rem; color: var(--primary); font-size: 14px; }
.admin-upload { background: #fff; border-radius: var(--radius); padding: 1rem 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.admin-upload__form { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* ===== Utility ===== */
.text-center { text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .certificates__grid { grid-template-columns: repeat(2, 1fr); }
    .partners__grid { grid-template-columns: repeat(3, 1fr); }
    .features__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .hero { height: 450px; }
    .hero__title { font-size: 2.2rem; }
    .hero__subtitle { font-size: 1rem; }
    
    .header__nav { position: fixed; left: 0; right: 0; top: 70px; width: auto; border-radius: 0; border: none; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
    
    .catalog__grid { grid-template-columns: 1fr; }
    .benefits__grid { grid-template-columns: 1fr; }
    .about__grid, .about-preview__grid { grid-template-columns: 1fr; }
    .features__grid { grid-template-columns: 1fr; }
    .facts__grid { grid-template-columns: 1fr; }
    .certificates__grid { grid-template-columns: repeat(2, 1fr); }
    .partners__grid { grid-template-columns: repeat(2, 1fr); }
    .contacts__grid { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: 1fr; }
    .news-card { grid-template-columns: 1fr; }
    .news-card__img { height: 200px; }
    .reviews-page__grid { grid-template-columns: 1fr; }
    .review-slide { min-width: 280px; }
    .product-detail__card { padding: 1.5rem; }
    .product-detail__actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .certificates__grid { grid-template-columns: 1fr; }
    .partners__grid { grid-template-columns: 1fr; }
    .facts { padding: 1.5rem; }
    .contacts__form-card { padding: 1.5rem; }
    .page-hero { padding: 2.5rem 0; }
}
