/* ==========================================================================
   Base Styles
   ========================================================================== */
:root {
    --primary-color: #2c7873;
    --primary-dark: #235d59;
    --secondary-color: #6fb98f;
    --accent-color: #f8b400;
    --light-color: #f5f5f5;
    --dark-color: #333;
    --gray-color: #777;
    --light-gray: #eaeaea;
    --success-color: #4caf50;
    --error-color: #f44336;
    --whatsapp-color: #25D366;
    --whatsapp-dark: #128C7E;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

p {
    margin-bottom: 1rem;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Header & Navigation (Adapted from aptlife.ru)
   ========================================================================== */
.header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-phone {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 18px;
    transition: var(--transition);
    white-space: nowrap;
}

.header-phone:hover {
    color: var(--primary-color);
}

.header-whatsapp {
    background-color: var(--whatsapp-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.header-whatsapp:hover {
    background-color: var(--whatsapp-dark);
}


/* ==========================================================================
   Product Page Styles
   ========================================================================== */
.product-page {
    padding: 0 0 40px 0;
}

.product-section {
    padding-top: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.product-image {
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 20px;
    background-color: white;
    box-shadow: var(--box-shadow);
}

.product-image img {
    display: block;
    margin: 0 auto;
    max-height: 400px;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.in-stock {
    display: inline-block;
    padding: 5px 10px;
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 15px;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.btn-buy {
    margin-bottom: 30px;
    font-size: 1.1rem;
    padding: 15px 30px;
}

.product-specs {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.product-specs th, .product-specs td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.product-specs th {
    font-weight: 500;
    color: var(--primary-dark);
    width: 40%;
}

/* ==========================================================================
   General Content Sections (Instruction, FAQ, etc.)
   ========================================================================== */
.instruction-section {
    padding: 60px 0;
    background-color: var(--light-color);
}
.instruction-section:first-child {
    background-color: #fff;
}

.instruction-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.instruction-content {
    max-width: 800px;
    margin: 0 auto;
}

.instruction-content h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.instruction-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
    list-style: disc;
}

.instruction-content li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 10px;
}

.faq-section {
    padding: 60px 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    background-color: white;
    border: none;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:after {
    content: '+';
    font-size: 1.2rem;
}

.faq-question.active:after {
    content: '-';
}

.faq-question:hover {
    background-color: var(--light-color);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
}

.faq-answer p {
    padding: 15px 0;
}

/* ==========================================================================
   Reviews & Order Form Sections
   ========================================================================== */
.reviews-section {
    padding: 60px 0;
}

.reviews-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.reviews-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.review-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid var(--light-gray);
}

.review-author {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.review-text {
    margin-bottom: 15px;
    font-style: italic;
    color: #555;
}

.review-rating {
    color: var(--accent-color);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.order-form-section {
    padding: 60px 0;
    background-color: var(--light-color);
}

.order-form-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 120, 115, 0.2);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 5px;
}

.form-disclaimer {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 20px;
    text-align: center;
}

/* ==========================================================================
   Expert Verification Block Styles
   ========================================================================== */
.expert-verification-block {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 25px;
    background-color: var(--light-color);
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.expert-photo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.expert-details {
    flex: 1;
}

.expert-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 0 5px 0;
}

.expert-bio {
    font-size: 0.9rem;
    color: var(--gray-color);
    line-height: 1.5;
    margin: 0;
}

.expert-bio strong {
    color: var(--dark-color);
}


/* ==========================================================================
   Utility & Misc Styles
   ========================================================================== */
.responsive-table {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 36px;
}

.responsive-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.responsive-table th, .responsive-table td {
  padding: 8px 12px;
  border: 1px solid #eaeaea;
  text-align: left;
}

/* ==========================================================================
   Footer Styles (Adapted from aptlife.ru)
   ========================================================================== */
.footer {
  background-color: #3a3a3a;
  color: #a0a0a0;
  padding: 60px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-column h4 {
  font-family: 'Playfair Display', serif;
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 1.4rem;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column a, .footer-column li {
  display: block;
  color: #a0a0a0;
  text-decoration: none;
  margin-bottom: 10px;
  transition: var(--transition);
}
.footer-column a:hover {
  color: #ffffff;
  transform: translateX(5px);
}
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #555;
  font-size: 14px;
}
.footer-bottom p {
    color: var(--gray-color);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 768px) {
    /* General */
    .product-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .expert-verification-block, .footer-grid {
        flex-direction: column;
        text-align: center;
    }
    .expert-verification-block {
        padding: 25px;
    }
    
    /* Header */
    .header {
        padding: 10px 0;
    }
    .logo-link {
        font-size: 22px;
    }
    .header-phone {
        display: none;
    }
    .header-whatsapp {
        font-size: 0;
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='white'%3E%3Cpath d='M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 221.9-99.6 221.9-222 .1-59.3-23.1-115-65.7-157.1zM223.9 439.6c-38.2 0-73.7-11.8-103.6-32.5L48 446.4l33.3-95.2c-22.8-31.1-36.4-68.8-36.4-108.8 0-98.2 79.9-178 178-178 49.1 0 95.2 19.2 130.4 54.4 35.2 35.2 54.5 81.3 54.5 130.4 0 98.2-79.9 178-178 178zm101.7-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.8-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 55%;
    }

    /* --- CORRECTED RESPONSIVE TABLE STYLES --- */
    .responsive-table thead {
      display: none;
    }
    .responsive-table tr {
      display: block;
      margin-bottom: 1.5rem;
      border: 1px solid var(--light-gray);
      border-radius: 8px;
      padding: 0.5rem 1rem;
      background-color: #fff;
    }
    .responsive-table tr:last-of-type {
      margin-bottom: 0;
    }
    .responsive-table td {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.8rem 0;
      border-bottom: 1px solid var(--light-gray);
      text-align: right;
      border-top: none; /* Override default borders */
      border-right: none;
      border-left: none;
    }
    .responsive-table tr td:last-child {
      border-bottom: none;
    }
    .responsive-table td::before {
      content: 'Label'; /* This will be overridden */
      font-weight: bold;
      color: var(--primary-dark);
      text-align: left;
    }
    .responsive-table td:nth-of-type(1)::before { content: "Название"; }
    .responsive-table td:nth-of-type(2)::before { content: "Производитель"; }
    .responsive-table td:nth-of-type(3)::before { content: "Дозировка"; }
    .responsive-table td:nth-of-type(4)::before { content: "Форма выпуска"; }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
    }
    
    .product-info h1 {
        font-size: 1.5rem;
    }
    
    .price {
        font-size: 1.5rem;
    }
}