/* ============================================================
   style.css – Quality Pharmaceuticals
   ============================================================ */

:root {
    --primary-teal: #62C7C7;
    --primary-teal-dark: #4FB3B3;
    --navy-blue: #1A365D;
    --navy-light: #3C5282;
    --white: #FFFFFF;
    --light-gray: #F7FAFC;
    --gray: #A0AEC0;
    --shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--navy-blue);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* ── Loading ── */
.loading {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; transition: opacity 0.5s ease;
}
.loading.hidden { opacity: 0; pointer-events: none; }
.loader {
    width: 50px; height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Navbar ── */
.navbar {
    position: fixed; top: 0; width: 100%;
    padding: 1rem 5%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    z-index: 1000; transition: all 0.3s ease;
    display: flex; justify-content: space-between; align-items: center;
}
.navbar.scrolled { background: rgba(255,255,255,0.95); box-shadow: var(--shadow); }

.logo { height: 50px; display: flex; align-items: center; }
.logo img { height: 100%; width: auto; max-width: 200px; object-fit: contain; }

.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a {
    text-decoration: none; color: var(--navy-blue);
    font-weight: 500; position: relative; transition: color 0.3s ease;
}
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--primary-teal); }
.nav-links a.active { color: var(--primary-teal); }
.nav-links a.active::after { width: 100%; }

.mobile-menu { display: none; flex-direction: column; cursor: pointer; }
.mobile-menu span { width: 25px; height: 3px; background: var(--navy-blue); margin: 3px 0; transition: 0.3s; }

/* ── Hero ── */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
    display: flex; align-items: center;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1.5" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.8" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}
.hero-content {
    max-width: 1200px; margin: 0 auto; padding: 0 5%;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center; position: relative; z-index: 2;
}
.hero-text h1 { font-size: clamp(2.5rem,5vw,4rem); color: var(--white); margin-bottom: 1.5rem; line-height: 1.2; }
.hero-text p { font-size: 1.2rem; color: rgba(255,255,255,0.9); margin-bottom: 2rem; max-width: 500px; }
.cta-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-image { position: relative; display: flex; justify-content: center; }
.hero-image img { max-width: 100%; height: 500px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-lg); }

.floating-icons {
    position: absolute; top: 20%; right: 10%;
    display: flex; flex-direction: column; gap: 2rem;
    opacity: 0.1; animation: float 6s ease-in-out infinite;
}
.floating-icons i { font-size: 2rem; color: var(--white); }
@keyframes float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }

/* ── Buttons ── */
.btn {
    padding: 1rem 2rem; border: none; border-radius: 50px;
    font-weight: 600; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.5rem;
    transition: all 0.3s ease; cursor: pointer;
    font-family: 'Poppins', sans-serif;
    position: relative; overflow: hidden;
}
.btn-primary { background: var(--white); color: var(--primary-teal); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.3); }
.btn-secondary:hover { background: var(--white); color: var(--primary-teal); }

/* ── Sections ── */
.section { padding: 6rem 5%; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; color: var(--navy-blue); }

/* ── Why Choose Us ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 2rem; margin-top: 4rem; }
.feature-card {
    background: var(--white); padding: 2.5rem 2rem; border-radius: 20px;
    text-align: center; box-shadow: var(--shadow);
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
}
.feature-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.feature-icon { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }

/* ── Stats ── */
.stats { background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%); padding: 4rem 5%; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 2rem; text-align: center; }
.stat-item h3 { font-size: 3rem; color: var(--primary-teal); font-weight: 700; margin-bottom: 0.5rem; }

/* ── Testimonials ── */
.testimonials { background: var(--white); }
.testimonial-slider { display: flex; overflow: hidden; border-radius: 20px; margin-top: 3rem; }
.testimonial {
    min-width: 100%; padding: 3rem;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    text-align: center; box-shadow: var(--shadow);
}
.testimonial-text { font-style: italic; font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--navy-blue); }
.testimonial-author { font-weight: 600; color: var(--primary-teal); }

/* ── CTA Banner ── */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    text-align: center; color: var(--white); padding: 4rem 5%;
}
.cta-banner h2 { font-size: 2.5rem; margin-bottom: 1rem; }

/* ── Products ── */
.products-header { text-align: center; padding: 4rem 5%; background: var(--light-gray); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 2rem; padding: 2rem 5%; }
.product-card {
    background: var(--white); border-radius: 20px; overflow: hidden;
    box-shadow: var(--shadow); transition: all 0.3s ease;
    position: relative; cursor: pointer;
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}
.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.product-card.visible { opacity: 1; transform: translateY(0); }
.product-image {
    aspect-ratio: 1 / 1; height: auto;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--white);
}
.product-info { padding: 1.5rem; }
.product-price { font-size: 1.5rem; font-weight: 700; color: var(--primary-teal); margin-bottom: 0.5rem; }

/* ── About ── */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.timeline { margin: 3rem 0; }
.timeline-item { display: flex; margin-bottom: 2rem; position: relative; }
.timeline-item::before {
    content: ''; position: absolute; left: 20px; top: 0; bottom: -2rem;
    width: 2px; background: var(--primary-teal);
}
.timeline-icon {
    width: 50px; height: 50px; background: var(--primary-teal);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--white); position: relative; z-index: 2; margin-right: 1rem;
}

/* ── Contact ── */
.contact-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.contact-form { background: var(--white); padding: 2.5rem; border-radius: 20px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1.5rem; }
.form-group input,
.form-group textarea {
    width: 100%; padding: 1rem;
    border: 2px solid #E2E8F0; border-radius: 12px;
    font-family: inherit; transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary-teal); }
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item {
    display: flex; align-items: center; gap: 1rem; padding: 1.5rem;
    background: var(--white); border-radius: 15px; box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
.contact-item:hover { transform: translateX(10px); }
.contact-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    border-radius: 12px; display: flex; align-items: center;
    justify-content: center; color: var(--white); font-size: 1.2rem;
}

/* ── Footer ── */
.footer { background: var(--navy-blue); color: var(--white); padding: 3rem 5% 1rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-section h3 { margin-bottom: 1rem; color: var(--primary-teal); }
.footer-section a {
    color: rgba(255,255,255,0.8); text-decoration: none;
    display: block; margin-bottom: 0.5rem; transition: color 0.3s ease;
}
.footer-section a:hover { color: var(--primary-teal); }
.social-icons { display: flex; gap: 1rem; }
.social-icons a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.social-icons a:hover { background: var(--primary-teal); transform: translateY(-3px); }
.footer-bottom {
    text-align: center; padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* ── Product Modal ── */
.product-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 2000;
    justify-content: center; align-items: center; padding: 0;
}
.product-modal.active { display: flex; }
.modal-content {
    background: var(--white); border-radius: 0;
    max-width: 100%; width: 100%;
    max-height: 100vh; height: 100vh;
    overflow-y: auto; position: relative;
    animation: modalSlideIn 0.3s ease;
    display: flex; flex-direction: column;
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 40px; height: 40px;
    background: var(--primary-teal); border: none; border-radius: 50%;
    color: var(--white); font-size: 1.5rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10; transition: all 0.3s ease;
}
.modal-close:hover { background: var(--primary-teal-dark); transform: rotate(90deg); }
.modal-body {
    display: flex; width: 100%; max-width: 1200px;
    margin: 0 auto; padding: 2rem; gap: 3rem; align-items: flex-start;
}
.modal-images-section { flex: 1; max-width: 500px; }
.modal-images { display: flex; flex-direction: column; gap: 1rem; }
.main-image {
    width: 100%; aspect-ratio: 3 / 4; max-height: 500px;
    background: var(--light-gray); border-radius: 15px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.main-image img { width: 100%; height: 100%; object-fit: contain; }
.gallery-images { display: flex; gap: 1rem; justify-content: center; }
.gallery-image {
    width: 100px; height: 100px;
    background: var(--light-gray); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; cursor: pointer; transition: all 0.3s ease;
    border: 2px solid transparent;
}
.gallery-image:hover, .gallery-image.active { border-color: var(--primary-teal); transform: scale(1.05); }
.gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.modal-info-section { flex: 1; max-width: 750px; padding-top: 1rem; }
.modal-brand { color: var(--gray); font-size: 0.9rem; margin-bottom: 0.5rem; }
.modal-info h2 { color: var(--navy-blue); margin-bottom: 1rem; font-size: 1.8rem; line-height: 1.3; }
.modal-price-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.modal-price { font-size: 2rem; color: var(--navy-blue); font-weight: 700; }
.modal-description { color: var(--navy-light); line-height: 1.8; margin-bottom: 2rem; }
.modal-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--light-gray); }
.modal-section-title { color: var(--navy-blue); margin-bottom: 1rem; font-size: 1.2rem; font-weight: 600; }

.quantity-options { display: flex; gap: 1rem; flex-wrap: wrap; }
.quantity-option {
    padding: 1rem 2rem; border: 2px solid var(--light-gray);
    border-radius: 12px; cursor: pointer; transition: all 0.3s ease;
    background: var(--white); text-align: center; min-width: 100px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.quantity-option:hover { border-color: var(--primary-teal); transform: translateY(-3px); box-shadow: var(--shadow); }
.quantity-option.active {
    border-color: var(--primary-teal);
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    color: var(--white); box-shadow: var(--shadow);
}
.quantity-option .qty-label { font-size: 1rem; font-weight: 600; display: block; }
.quantity-option .qty-price { font-size: 0.85rem; opacity: 0.9; display: block; margin-top: 0.3rem; }

/* ── Ingredients ── */
.modal-ingredients-full { width: 100%; padding: 0 2rem 2rem 2rem; border-top: 1px solid var(--light-gray); }
.modal-ingredients-full .modal-section-title { text-align: center; padding-top: 1.5rem; margin-bottom: 1.5rem; }
.ingredients-table { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; width: 100%; }
.ingredient-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.75rem; padding: 1.2rem 1rem;
    background: var(--white); border-radius: 10px; text-align: center;
    border: 1px solid var(--light-gray); transition: all 0.3s ease;
}
.ingredient-item:hover { box-shadow: var(--shadow); }
.ingredient-item img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-teal); flex-shrink: 0; }
.ingredient-item .ingredient-icon {
    width: 90px; height: 90px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 1.5rem; flex-shrink: 0;
}
.ingredient-item p { font-size: 0.95rem; color: var(--navy-blue); font-weight: 600; margin: 0; }
.ingredient-item p strong { font-weight: 800; }
.ingredient-desc { font-size: 0.8rem; color: var(--gray); margin-top: 0.2rem; line-height: 1.4; }

/* ── Scroll Animations ── */
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-gray); }
::-webkit-scrollbar-thumb { background: var(--primary-teal); border-radius: 4px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu { display: flex; }
    .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: var(--white); padding: 1rem 5%; box-shadow: var(--shadow); }
    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .floating-icons { display: none; }
    .cta-buttons { justify-content: center; }
    .about-content, .contact-content { grid-template-columns: 1fr; }
    .section { padding: 3rem 5%; }
    .modal-body { flex-direction: column; padding: 1rem; gap: 1.5rem; }
    .modal-images-section { max-width: 100%; }
    .modal-info-section { max-width: 100%; }
    .main-image { max-height: 350px; }
    .modal-price { font-size: 1.5rem; }
    .ingredients-table { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
    .gallery-images { gap: 0.5rem; }
    .gallery-image { width: 80px; height: 80px; }
    .ingredient-item { padding: 0.5rem 0.75rem; }
    .modal-section-title { font-size: 1.1rem; }
    .ingredients-table { grid-template-columns: 1fr 1fr; }
}
