/* style.css - Premium Frontend Aesthetics */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette (Based on Logo) */
    --primary: #4b5e26; /* Olive Green */
    --primary-light: #6b8e23;
    --primary-dark: #3b4a1b;
    --secondary: #dfb4a0; /* Peach/Pink */
    --accent: #d4a373; /* Warm Accent */
    
    /* Neutral Colors */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

/* Header & Glassmorphism */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--secondary);
    color: white;
    font-size: 0.75rem;
    height: 20px;
    min-width: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(236, 72, 153, 0.4);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* Main Content Area */
main {
    flex: 1;
    padding: 3rem 0;
}

/* Cards & Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.product-img-wrapper {
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    margin-top: auto;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: white;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #94a3b8;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 2rem;
    padding: 5rem 3rem;
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Cart & Checkout tables */
.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
}

.cart-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
}

.cart-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* ==========================================================================
   Premium Responsive Design (Media Queries)
   ========================================================================== */

/* 1. Tablets and Small Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .hero h1, .hero-slider h1 {
        font-size: 2.75rem;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* 2. Mobile Devices & Tablets (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }

    /* Header & Navigation */
    .site-header {
        height: auto;
        padding: 1rem 0;
        position: static;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 1.25rem;
        align-items: center;
        text-align: center;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1.25rem;
        flex-wrap: wrap;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
        gap: 1.25rem;
    }

    /* Hero Section / Banner Slider */
    .hero {
        padding: 3rem 1.5rem;
        border-radius: 1.5rem;
        margin-bottom: 2.5rem;
        text-align: center;
    }
    
    .hero h1, .hero-slider h1 {
        font-size: 2rem !important;
        line-height: 1.3;
    }
    
    .hero p, .hero-slider p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .hero-slider {
        height: 380px !important;
        border-radius: 1.5rem !important;
        margin-bottom: 2.5rem !important;
    }
    
    .slide-item {
        padding: 3rem 1.5rem !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Product Section Headers */
    section[style*="margin-bottom: 4rem"] > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1rem;
    }
    
    section[style*="margin-bottom: 4rem"] h2 {
        font-size: 1.85rem !important;
    }

    /* Features Section */
    section[style*="display: grid"][style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        margin-bottom: 2.5rem !important;
    }

    /* Footer */
    .site-footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-col h3 {
        margin-bottom: 1rem;
    }
    
    .footer-col ul li {
        margin-bottom: 0.5rem;
    }

    /* Table Conversion to Card Layout on Mobile */
    .cart-table, 
    .cart-table thead, 
    .cart-table tbody, 
    .cart-table th, 
    .cart-table td, 
    .cart-table tr {
        display: block;
    }
    
    .cart-table thead {
        display: none; /* Hide header */
    }
    
    .cart-table tr {
        margin-bottom: 1.25rem;
        border: 1px solid var(--border);
        border-radius: 1rem;
        padding: 1rem;
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
    }
    
    .cart-table td {
        text-align: right;
        padding: 0.75rem 0;
        border-bottom: 1px dashed var(--border);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .cart-table td:last-child {
        border-bottom: none;
    }
    
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
        margin-right: 1rem;
    }

    /* Details Page layout */
    .product-detail-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

/* Layout Grids */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.checkout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.profile-container {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

/* 3. Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    /* Premium 2-Column Product Grid for Mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .product-card {
        border-radius: 0.75rem;
    }
    
    .product-img-wrapper {
        height: 150px !important;
    }
    
    .product-info {
        padding: 0.75rem !important;
    }
    
    .product-category {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem;
    }
    
    .product-title {
        font-size: 0.95rem !important;
        line-height: 1.2;
        height: 2.4rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 0.25rem;
    }
    
    .product-price {
        font-size: 1.15rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Buttons */
    .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Layout Overrides */
    .checkout-container,
    .profile-container {
        grid-template-columns: 1fr !important;
    }
    
    .checkout-container > div:last-child {
        position: static !important;
    }
}

