/**
 * Neevan Tea - Main Stylesheet
 * Production-ready CSS with optimized colors, typography, and responsiveness
 */

:root {
    --color-primary: #0f7d47;
    --color-primary-dark: #0b5a34;
    --color-accent: #ccefdc;
    --color-accent-dark: #1ab054;
    --color-white: #ffffff;
    --color-light-bg: #f0f9f5;
    --color-text-muted: #555;
    --color-text-dark: #333;
    --color-border: #d1f2d1;
    --color-footer-text: #d9ffd9;

    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --transition: 0.3s ease;
}

/* ===== RESET & GLOBAL ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-white);
    color: var(--color-text-dark);
    line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
}

.section-title {
    color: var(--color-primary);
}

/* ===== NAVBAR ===== */
.navbar-custom {
    background-color: var(--color-primary) !important;
    border-bottom: 3px solid var(--color-primary-dark);
    padding: 1rem 0;
}

.navbar-logo {
    height: 50px;
    margin-right: 10px;
    object-fit: contain;
}

.navbar-brand {
    font-family: var(--font-heading);
    color: var(--color-white) !important;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar .nav-link {
    color: var(--color-white) !important;
    padding: 8px 14px;
    border-radius: 8px;
    margin-left: 8px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: background var(--transition), color var(--transition), transform 0.12s ease, box-shadow var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    color: var(--color-footer-text) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.navbar-toggler-icon {
    filter: invert(1) hue-rotate(180deg) saturate(0.6);
}

.navbar-collapse {
    background: transparent;
}

.navbar-collapse.show {
    background: rgba(15, 125, 71, 0.98);
}

@media (min-width: 992px) {
    .navbar .nav-link {
        padding: 10px 18px;
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    height: 100vh;
    background-color: var(--color-primary);
    background-image: linear-gradient(rgba(15, 125, 71, 0.5), rgba(15, 125, 71, 0.5)), url('../images/hero-image.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 125, 71, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 22px;
    margin-bottom: 35px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-actions,
.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.hero-actions .btn-primary {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.hero-actions .btn-primary:hover {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 14px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition), transform 0.2s ease, box-shadow var(--transition);
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.btn-secondary {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid var(--color-white);
    cursor: pointer;
    transition: background-color var(--transition), transform 0.2s ease, box-shadow var(--transition);
    text-align: center;
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-banner .btn-secondary,
.contact .btn-secondary,
#contact .btn-secondary {
    background-color: var(--color-white);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--color-primary);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), transform 0.2s ease;
    text-align: center;
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-1px);
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--color-primary-dark);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.order-btn,
.sample-btn {
    cursor: pointer;
}

/* ===== CTA BANNER ===== */
.cta-banner {
    background-color: var(--color-light-bg);
}

.cta-banner h3 {
    color: var(--color-primary);
}

/* ===== TEA CARDS ===== */
.tea-card {
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    position: relative;
}

.tea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(15, 125, 71, 0.15);
}

.tea-card img {
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* ===== MOST ORDERED BADGE ===== */
.badge-most-ordered {
    position: absolute;
    top: 0;
    right: -8px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 6px 16px rgba(204, 0, 0, 0.3);
    border: 2px solid #880000;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    transform: rotate(12deg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-most-ordered::before {
    content: '★';
    color: #ffffff;
    font-size: 13px;
}

@media (max-width: 576px) {
    .badge-most-ordered {
        top: 0;
        right: -5px;
        font-size: 11px;
        padding: 6px 12px;
        transform: rotate(12deg);
    }
}

.tea-card h5 {
    color: var(--color-primary);
    margin-top: 20px;
    font-weight: 600;
}

.tea-card p {
    color: var(--color-text-muted);
}

.product-meta {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary) !important;
    margin-bottom: 0;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.product-actions .btn-outline {
    padding: 8px 16px;
}

/* ===== VISION SECTION ===== */
.vision-section {
    background: linear-gradient(135deg, var(--color-light-bg) 0%, #e8f5f0 100%);
    margin-top: 40px;
}

.vision-section h2 {
    color: var(--color-primary);
    margin-bottom: 30px;
}

.vision-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* ===== GALLERY ===== */
.gallery-frame {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.gallery-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #f8f9fa;
    border-radius: 16px;
    min-height: 320px;
    position: relative;
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    gap: 18px;
    align-items: center;
    min-width: fit-content;
    transition: transform var(--transition);
    cursor: grab;
    padding: 20px;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-track img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--color-accent);
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    transition: transform 0.2s ease, border-color var(--transition);
}

.gallery-track img:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
}

/* ===== GALLERY DOTS ===== */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: none;
    cursor: pointer;
    transition: background-color var(--transition), box-shadow var(--transition);
    padding: 0;
    box-shadow: 0 1px 4px rgba(15, 125, 71, 0.08);
}

.gallery-dot:hover,
.gallery-dot:focus {
    background-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(15, 125, 71, 0.18);
    outline: 2px solid rgba(15, 125, 71, 0.3);
    outline-offset: 2px;
}

.gallery-dot.active {
    background-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(15, 125, 71, 0.18);
}

/* ===== TESTIMONIALS ===== */
.testimonials-section {
    background-color: var(--color-light-bg);
}

.testimonial-card {
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(15, 125, 71, 0.1);
}

.testimonial-rating {
    color: #ffc107;
    font-size: 18px;
    letter-spacing: 2px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--color-primary);
    color: var(--color-footer-text);
}

.footer-link {
    color: var(--color-footer-text);
    text-decoration: underline;
    transition: opacity var(--transition);
}

.footer-link:hover {
    opacity: 0.8;
}

.footer-text {
    color: var(--color-footer-text);
    line-height: 1.7;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ===== DELIVERY CHECK ===== */
.delivery-section {
    background: linear-gradient(180deg, #ffffff 0%, var(--color-light-bg) 100%);
}

.delivery-card {
    max-width: 640px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 8px 24px rgba(15, 125, 71, 0.08);
}

.delivery-form {
    width: 100%;
}

.delivery-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.delivery-input-row .form-control {
    flex: 1 1 160px;
    min-width: 140px;
}

.delivery-input-row .btn-primary,
.delivery-input-row .btn-outline {
    flex: 0 0 auto;
    white-space: nowrap;
}

.delivery-input-row--compact .btn-outline {
    padding: 10px 14px;
}

.delivery-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.delivery-status--ok {
    background: #e8f8ef;
    color: var(--color-primary-dark);
    border: 1px solid #b6e6c8;
}

.delivery-status--warn {
    background: #fff8e6;
    color: #8a5a00;
    border: 1px solid #f0d48a;
}

.delivery-status--error {
    background: #fdecea;
    color: #9b1c1c;
    border: 1px solid #f0b4b4;
}

.delivery-status--info {
    background: #eef6ff;
    color: #1a4b8c;
    border: 1px solid #b7d4f5;
}

/* ===== ORDER ITEMS ===== */
.order-item-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 0.7fr auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--color-light-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.order-item-row label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.order-item-remove {
    background: none;
    border: none;
    color: #b00020;
    font-size: 20px;
    line-height: 1;
    padding: 6px 8px;
    cursor: pointer;
    align-self: center;
}

.order-note {
    margin-bottom: 0;
}

.confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #e8f8ef;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}

/* ===== FOOTER MAP ===== */
.footer-map {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    aspect-ratio: 16 / 7;
    min-height: 180px;
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    min-height: 180px;
}

/* ===== MOBILE ACTION BAR ===== */
.mobile-action-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.mab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    border: none;
    background: transparent;
    color: var(--color-text-dark);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
}

.mab-btn:hover,
.mab-btn:focus {
    background: var(--color-light-bg);
    color: var(--color-primary);
}

.mab-btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.mab-btn--primary:hover,
.mab-btn--primary:focus {
    background: var(--color-primary-dark);
    color: var(--color-white);
}

.mab-icon {
    font-size: 18px;
    line-height: 1;
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background-color: #25d366;
    color: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 28px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background-color var(--transition), transform 0.2s ease;
    z-index: 999;
    border: none;
}

.whatsapp-float:hover {
    background-color: var(--color-accent-dark);
    transform: scale(1.1);
}

.whatsapp-float:focus {
    outline: 2px solid rgba(37, 211, 102, 0.3);
    outline-offset: 2px;
}

/* ===== FORM STYLES ===== */
.form-control {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px 12px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(15, 125, 71, 0.1);
}

.form-label {
    color: var(--color-primary);
    font-weight: 600;
}

/* ===== MODAL ===== */
.modal-header {
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    color: var(--color-primary);
}

.btn-close:focus {
    box-shadow: 0 0 0 3px rgba(15, 125, 71, 0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 48px;
    }

    .hero-content p {
        font-size: 20px;
    }

    .gallery-track img {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 76px;
    }

    .navbar {
        padding: 15px 20px;
    }

    .navbar-brand {
        font-size: 22px;
    }

    .navbar .nav-link {
        padding: 8px 12px;
        margin-left: 4px;
        font-size: 14px;
    }

    .hero-section {
        height: auto;
        min-height: 85vh;
    }

    .hero-content h1 {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 18px;
        margin-bottom: 25px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }

    .cta-banner h3 {
        font-size: 1.5rem;
    }

    .cta-banner p {
        font-size: 0.9rem;
    }

    .gallery-track img {
        width: 200px;
        height: 200px;
    }

    .gallery-scroll {
        min-height: 240px;
    }

    .section-title {
        font-size: 28px;
    }

    .vision-section p,
    .card > p {
        font-size: 1rem;
    }

    .testimonial-card {
        margin-bottom: 15px;
    }

    .testimonial-rating {
        font-size: 16px;
    }

    .mobile-action-bar {
        display: grid;
    }

    .whatsapp-float {
        display: none;
    }

    .order-item-row {
        grid-template-columns: 1fr 1fr;
    }

    .order-item-row .order-item-remove {
        grid-column: 2;
        justify-self: end;
    }

    .footer-map {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .navbar-brand {
        font-size: 20px;
    }

    .navbar-logo {
        height: 40px;
    }

    .hero-content h1 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 13px;
    }

    .section-title {
        font-size: 24px;
    }

    .tea-card {
        margin-bottom: 15px;
    }

    .gallery-track img {
        width: 180px;
        height: 180px;
    }

    .gallery-scroll {
        min-height: 220px;
        border-radius: 12px;
    }

    .gallery-track {
        gap: 12px;
        padding: 15px;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
        right: 15px;
        bottom: 15px;
        font-size: 24px;
    }

    .delivery-input-row .btn-primary,
    .delivery-input-row .btn-outline {
        flex: 1 1 auto;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary,
    .cta-actions .btn-primary,
    .cta-actions .btn-secondary,
    .cta-actions .btn-outline {
        width: 100%;
        max-width: 280px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-color-scheme: light) {
    body {
        background-color: var(--color-white);
        color: var(--color-text-dark);
    }
}
