/* ===== CSS Variables & Basic Setup ===== */
:root {
    --primary: #059669;
    /* Emerald Green */
    --primary-light: #10b981;
    --primary-dark: #047857;
    --secondary: #f3f4f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --accent: #f59e0b;
    /* Amber */
    --accent-hover: #d97706;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 20px rgba(5, 150, 105, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: #fafafa;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* ===== Typography & Helpers ===== */
a {
    text-decoration: none;
    color: inherit;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    background: var(--primary);
    bottom: -8px;
    left: 25%;
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
    position: relative;
}

.navbar:not(.scrolled) .nav-links a,
.navbar:not(.scrolled) .logo,
.navbar:not(.scrolled) .cart-icon {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: var(--white);
}


.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--primary);
    bottom: -4px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cart-icon {
    position: relative;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dark);
}

.badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.1rem 0.4rem;
    border-radius: 50%;
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: url('assets/banner.png') center/cover no-repeat;
    text-align: center;
    color: var(--white);
    padding: 0 1rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(5, 150, 105, 0.6);
}

/* ===== Products Section ===== */
.products {
    padding: 6rem 5%;
    background: #fdfdfd;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-soft);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #f0fdf4;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.1);
}

.overlay-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.product-card:hover .overlay-actions {
    opacity: 1;
    transform: translateX(0);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--text-dark);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--accent);
    color: var(--white);
}

.card-info {
    padding: 1.5rem;
}

.card-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card-info .desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    min-height: 40px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-row .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

.btn-buy {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.btn-buy:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* ===== Payment Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    /* Allow modal to fit screen height */
    overflow-y: auto;
    /* Enable internal scrolling if content is too large */
    padding: 2.5rem;
    position: relative;
    transform: translateY(50px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    scrollbar-width: thin;
}

/* Custom Scrollbar for Modal Content */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ef4444;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
}

.modal-header p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.order-summary {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.summary-item,
.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.summary-total {
    margin-bottom: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ced4da;
    font-weight: 700;
    font-size: 1.2rem;
}

.total-highlight {
    color: var(--primary);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.input-group label i {
    color: var(--primary);
    margin-right: 0.3rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

.hidden {
    display: none !important;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 1rem 0;
    animation: fadeIn 0.5s ease forwards;
}

.success-icon-wrapper {
    width: 70px;
    height: 70px;
    background: #d1fae5;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.success-message p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-secondary {
    padding: 0.8rem 2rem;
    background: var(--secondary);
    color: var(--text-dark);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 6rem 5%;
    background: var(--secondary);
    position: relative;
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    /* Seamless container edges */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    /* Premium shadow */
}

/* Accent Panel (Left) */
.contact-info {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 2.5rem;
    font-family: 'Outfit', sans-serif;
    position: relative;
    display: inline-block;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background: var(--accent);
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.3rem;
    color: var(--primary-dark);
    background: var(--white);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.info-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.info-item h4 {
    color: var(--white);
    margin-bottom: 0.4rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.info-item p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Form Section (Right) */
.contact-form-wrapper {
    background: var(--white);
    padding: 3.5rem;
}

.contact-form-wrapper .input-group input,
.contact-form-wrapper .input-group textarea {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.contact-form-wrapper .input-group input:focus,
.contact-form-wrapper .input-group textarea:focus {
    background: var(--white);
    border-color: var(--primary);
}

/* Reusing .input-group and .btn-submit from Payment Modal styling */

/* ===== Footer ===== */
footer {
    background: #111827;
    color: #f3f4f6;
    padding: 4rem 5% 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.brand h2 {
    color: var(--primary-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand p {
    max-width: 400px;
    color: #9ca3af;
    line-height: 1.6;
}

.socials {
    display: flex;
    gap: 1rem;
}

.socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.socials a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.9rem;
}

/* ===== Animations ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Initially hide elements for scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* On-load animations for hero */
.animate-text.slide-up {
    animation: slideUp 0.8s forwards;
}

.animate-text.fade-in {
    opacity: 0;
    animation: fadeIn 1s 0.3s forwards;
}

.animate-text.pop-in {
    opacity: 0;
    animation: popIn 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
    transition-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
    transition-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
    transition-delay: 0.8s;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
    }

    /* Simplified for mobile */
    .footer-content {
        flex-direction: column;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 85vh;
        border-radius: 16px;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal-header p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }
}

/* ===== Cart Sidebar ===== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2001;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.cart-header h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s;
}

.close-cart:hover {
    color: #ef4444;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-right: 0.5rem;
}

/* Custom Scrollbar for Cart Items */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--white);
    padding: 0.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.3rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: #f1f5f9;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    width: fit-content;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-display {
    font-weight: 600;
    font-size: 0.95rem;
}

.remove-item {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-item:hover {
    background: #ef4444;
    color: white;
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-light);
    margin-top: 2rem;
    font-style: italic;
}

.cart-footer {
    margin-top: 1.5rem;
    border-top: 2px dashed #cbd5e1;
    padding-top: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.cart-total-price {
    color: var(--primary);
    font-size: 1.5rem;
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-checkout:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(5, 150, 105, 0.4);
}

.btn-checkout:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* Badge Pulse Animation */
@keyframes pulseBadge {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
        background-color: #ef4444;
    }

    100% {
        transform: scale(1);
    }
}

.pulse-badge {
    animation: pulseBadge 0.4s ease;
}