/**
 * Template-2: Modern Minimalist
 * Clean, fresh, contemporary design with subtle animations
 * Primary Color: Fresh Green (#22c55e)
 */

/* ===== Root Variables ===== */
:root {
    --t2-primary: #22c55e;
    --t2-primary-dark: #16a34a;
    --t2-primary-light: #86efac;
    --t2-secondary: #065f46;
    --t2-bg: #f8fafc;
    --t2-bg-alt: #ffffff;
    --t2-text: #1e293b;
    --t2-text-muted: #64748b;
    --t2-border: #e2e8f0;
    --t2-shadow: rgba(0, 0, 0, 0.08);
    --t2-shadow-lg: rgba(0, 0, 0, 0.12);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--t2-bg);
    color: var(--t2-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Navbar ===== */
.navbar-custom {
    background: var(--t2-bg-alt);
    box-shadow: 0 2px 20px var(--t2-shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-custom.scrolled {
    box-shadow: 0 4px 30px var(--t2-shadow-lg);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--t2-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand img {
    height: 45px;
}

.nav-link {
    color: var(--t2-text) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--t2-primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--t2-primary) !important;
}

.nav-link:hover::after {
    width: 60%;
}

.cart-toggle {
    background: var(--t2-primary) !important;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-toggle:hover {
    background: var(--t2-primary-dark) !important;
    transform: scale(1.05);
}

.cart-badge {
    font-size: 0.7rem !important;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--t2-primary) 0%, var(--t2-secondary) 100%);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.btn-hero {
    background: white !important;
    color: var(--t2-primary) !important;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    color: var(--t2-primary-dark) !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Category Navigation ===== */
.category-nav {
    background: var(--t2-bg-alt);
    padding: 1.5rem 0;
    position: sticky;
    top: 80px;
    z-index: 900;
    box-shadow: 0 2px 10px var(--t2-shadow);
}

.cat-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem;
}

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

.cat-pill {
    background: white;
    color: var(--t2-text);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--t2-border);
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.cat-pill:hover {
    border-color: var(--t2-primary);
    color: var(--t2-primary);
    transform: translateY(-2px);
}

.cat-pill.active {
    background: var(--t2-primary);
    color: white;
    border-color: var(--t2-primary);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

/* ===== Menu Items ===== */
.menu-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--t2-text);
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--t2-primary);
    border-radius: 2px;
}

.t2-item-card {
    background: var(--t2-bg-alt);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px var(--t2-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: 1px solid var(--t2-border);
}

.t2-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--t2-shadow-lg);
    border-color: var(--t2-primary-light);
}

.t2-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.t2-item-card:hover .t2-item-image {
    transform: scale(1.05);
}

.t2-item-content {
    padding: 1.5rem;
}

.t2-item-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--t2-text);
}

.t2-item-description {
    font-size: 0.9rem;
    color: var(--t2-text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.t2-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.t2-item-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--t2-primary);
}

.t2-add-btn {
    background: var(--t2-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t2-add-btn:hover {
    background: var(--t2-primary-dark);
    transform: scale(1.05);
}

.t2-add-btn:active {
    transform: scale(0.95);
}

/* ===== Cart Modal ===== */
.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.cart-modal {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 100%;
    height: 100vh;
    background: var(--t2-bg-alt);
    z-index: 2001;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-modal-overlay.show .cart-modal {
    right: 0;
}

.cart-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--t2-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--t2-bg);
}

.cart-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--t2-text);
}

.cart-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--t2-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-modal-close:hover {
    background: var(--t2-border);
    color: var(--t2-text);
}

.cart-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-cart-icon {
    font-size: 4rem;
    color: var(--t2-border);
    margin-bottom: 1rem;
}

.browse-menu-btn {
    background: var(--t2-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.browse-menu-btn:hover {
    background: var(--t2-primary-dark);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--t2-bg);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 15px var(--t2-shadow);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-image-placeholder {
    width: 80px;
    height: 80px;
    background: var(--t2-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t2-text-muted);
    font-size: 2rem;
}

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--t2-text);
}

.cart-item-variant {
    font-size: 0.85rem;
    color: var(--t2-text-muted);
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--t2-bg-alt);
    border-radius: 8px;
    padding: 0.25rem;
}

.cart-item-quantity button {
    background: var(--t2-border);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-quantity button:hover {
    background: var(--t2-primary);
    color: white;
}

.cart-item-price {
    font-weight: 700;
    color: var(--t2-primary);
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    background: #fee2e2;
}

.cart-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--t2-border);
    background: var(--t2-bg);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.cart-summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--t2-text);
    padding-top: 0.75rem;
    border-top: 2px solid var(--t2-border);
}

.btn-checkout {
    background: var(--t2-primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    width: 100%;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    background: var(--t2-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

/* ===== Footer ===== */
.footer-custom {
    background: var(--t2-secondary);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-custom a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.footer-custom a:hover {
    color: white;
    padding-left: 5px;
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .category-nav {
        top: 70px;
    }

    .cart-modal {
        width: 100%;
        right: -100%;
    }

    .t2-item-card {
        margin-bottom: 1rem;
    }
}
