/* --- style.css (Complete and Unified) --- */

/* 1. Modern CSS Variables */
:root {
    --bg-primary: #0A0A0B;
    --bg-secondary: #111113;
    --bg-card: #1A1A1D;
    --bg-glass: rgba(26, 26, 29, 0.8);
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --accent-primary: #10B981;
    --accent-secondary: #059669;
    --accent-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --border-subtle: #2D2D30;
    --border-accent: #374151;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.15);
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* 2. Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-secondary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

main {
    padding: 4rem 0;
}

/* 3. Typography */
h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, #FFFFFF 0%, #9CA3AF 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 3rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 4rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* 4. Global Components (Header, Footer, Button) */
header {
    position: sticky; top: 0; z-index: 1000;
    padding: 1rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

header .container { display: flex; justify-content: space-between; align-items: center; }
.logo-link { display: flex; align-items: center; color: var(--text-primary); text-decoration: none; font-family: var(--font-primary); font-size: 1.5rem; font-weight: 600; }
.logo { height: 48px; width: 48px; margin-right: 12px; }
.cart-link { position: relative; display: flex; align-items: center; gap: 8px; padding: 12px 24px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-primary); text-decoration: none; font-weight: 500; transition: all 0.3s ease; overflow: hidden; }
.cart-link::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: var(--accent-gradient); transition: left 0.3s ease; z-index: -1; }
.cart-link:hover { border-color: var(--accent-primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cart-link:hover::before { left: 0; }

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p { color: var(--text-muted); font-size: 0.95rem; }

.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 16px 32px; background: var(--accent-gradient); color: white;
    text-decoration: none; font-weight: 600; font-size: 1.1rem; border-radius: var(--radius-md);
    border: none; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md); overflow: hidden;
}
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.5s; }
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-xl), var(--shadow-glow); }
.btn:hover::before { left: 100%; }
.btn:active { transform: translateY(-1px) scale(1.01); }


/* 5. Page Sections (Hero, Products) */
.hero {
    min-height: 90vh; display: flex; align-items: center; justify-content: center; text-align: center;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%), url('images/banner.webp');
    background-size: cover; background-position: center; background-attachment: fixed;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; animation: fadeInUp 1s ease-out; }
.hero p { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.products { padding: 6rem 0; }
#product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }

.product-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
    overflow: hidden; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); border-color: var(--accent-primary); box-shadow: var(--shadow-xl), 0 0 0 1px rgba(16, 185, 129, 0.1), var(--shadow-glow); }
.product-card img { width: 100%; height: 300px; object-fit: cover; transition: transform 0.4s ease; display: block; }
.product-card:hover img { transform: scale(1.05); }
.product-info { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-info h3 { font-size: 1.5rem; color: var(--text-primary); margin-top: 0; }
.product-info p { flex-grow: 1; font-size: 0.95rem; margin-bottom: 1.5rem; }
.product-price-display { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); margin-bottom: 1.5rem; font-family: var(--font-primary); }
.product-controls { display: flex; gap: 12px; align-items: center; margin-top: auto; }
.weight-select { flex-grow: 1; padding: 14px 16px; background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); font-family: inherit; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 48px; }
.weight-select:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.product-controls .btn { flex-shrink: 0; padding: 14px 24px; font-size: 0.95rem; }


/* 6. Page-Specific Styles (Checkout & Success) */

/* Checkout Page */
.checkout-container { max-width: 1100px; }
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: flex-start; }
.customer-info, .order-summary { background: var(--bg-card); padding: 2rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.customer-info h2, .order-summary h2 { text-align: left; margin-bottom: 2rem; font-size: 1.75rem; }
.form-group { margin-bottom: 1.25rem; }
.form-row { display: flex; gap: 1.25rem; }
.form-row .form-group { flex: 1; }
#checkout-form label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; }
#checkout-form input { width: 100%; padding: 14px; background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); color: var(--text-primary); font-size: 1rem; transition: all 0.3s ease; }
#checkout-form input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
#checkout-form .btn { width: 100%; margin-top: 1rem; }
.cart-item { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-subtle); }
.cart-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-md); }
.cart-item .item-details { flex-grow: 1; font-size: 0.95rem; }
.item-details p { margin: 0; line-height: 1.4; }
.item-details p strong { color: var(--text-primary); font-size: 1rem; }
.cart-item > span { font-weight: 600; font-family: var(--font-primary); }
.remove-item { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 0 0.5rem; transition: color 0.3s ease; }
.remove-item:hover { color: #ff6b6b; }
.summary-totals { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-subtle); }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 0.75rem; font-size: 1rem; color: var(--text-secondary); }
.summary-line.total { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-top: 1rem; }
.summary-line.total #total-price { color: var(--accent-primary); }

/* Success Page */
.success-container { max-width: 700px; text-align: center; }
.success-box { background: var(--bg-card); padding: 2.5rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); text-align: center; }
.success-box p { margin-bottom: 1.5rem; }
.email-address { background: var(--bg-secondary); padding: 1rem; border-radius: var(--radius-md); font-size: 1.2rem; font-weight: 600; color: var(--accent-primary); font-family: var(--font-primary); letter-spacing: 0.05em; word-break: break-all; }
.order-number { font-size: 2.5rem; color: var(--text-primary); background: var(--accent-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-top: 0.5rem; padding: 0.5rem; }
.important-note strong { color: var(--text-primary); }
#order-status { margin: -1rem 0 2rem 0; font-family: var(--font-secondary); font-size: 1.2rem; font-weight: 500; }
.success-container .btn { margin-top: 2rem; }

/* 7. Animations & Scrollbar */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* 8. Responsive Design */
@media (min-width: 800px) {
    .checkout-grid { grid-template-columns: 1.25fr 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    header { padding: 0.75rem 0; }
    .logo-link { font-size: 1.25rem; }
    .logo { height: 40px; width: 40px; }
    .cart-link { padding: 10px 16px; font-size: 0.9rem; }
    .hero { min-height: 90vh; }
    .products { padding: 4rem 0; }
    #product-grid { grid-template-columns: 1fr; }
    .product-controls { flex-direction: column; }
    .product-controls .btn, .weight-select { width: 100%; }
}