/* 
 * AKG Store Pro - Main Stylesheet 
 * Mobile-first modern approach
 */

:root {
    /* Color Palette */
    --primary-color: #0A84FF;
    --primary-hover: #006DDA;
    --secondary-color: #111111;
    --accent-color: #FF6A00;
    --accent-hover: #E65C00;

    /* Theme - Light Mode (Default) */
    --bg-color: #f7f9fa;
    --bg-surface: #ffffff;
    --bg-alt: #f0f2f5;
    
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --text-light: #ffffff;
    
    --border-color: #e5e5ea;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
    
    --success-color: #34c759;
    --error-color: #ff3b30;

    /* Borders & Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    
    /* Layout */
    --container-max: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
}

[data-theme="dark"] {
    --bg-color: #121315;
    --bg-surface: #1E2025;
    --bg-alt: #16181b;
    
    --text-main: #f5f5f7;
    --text-muted: #9ba1a6;
    
    --border-color: #2A2C32;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.8);
    
    --primary-color: #00C3FF;
    --primary-hover: #009BD6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

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

ul {
    list-style: none;
}

/* =======================================
   Typography
   ======================================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.text-error { color: var(--error-color); }
.text-success { color: var(--success-color); }


/* =======================================
   Layout & Utilities
   ======================================= */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

/* =======================================
   Buttons
   ======================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

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

.btn-cta {
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-cta:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.3);
}

/* =======================================
   Header
   ======================================= */
.site-header {
    background-color: var(--bg-surface); /* Fallback */
    /* Convert hex to rgb for fallback or use a solid color if backdrop-filter is active */
    background-color: color-mix(in srgb, var(--bg-surface) 85%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    height: 80px;
}

.site-title a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.05em;
}

/* Search Bar */
.header-search {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-alt);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.1);
}

.search-submit {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.primary-menu-container ul {
    display: flex;
    gap: 1.5rem;
}

.primary-menu-container a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.primary-menu-container a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-alt);
}

[data-theme="dark"] .sun { display: block; }
[data-theme="dark"] .moon { display: none; }
[data-theme="light"] .sun { display: none; }
[data-theme="light"] .moon { display: block; }


/* =======================================
   Home Sections
   ======================================= */
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Trust Badge in title */
.trust-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

/* Hero Section */
.hero-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-alt) 100%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.hero-image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: radial-gradient(circle, var(--primary-hover) 0%, var(--primary-color) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-card h3 {
    font-size: 1.125rem;
    margin: 0;
}

/* Product/Deal Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.deal-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.deal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(10, 132, 255, 0.3);
}

.deal-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.discount-tag {
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 4px rgba(255, 106, 0, 0.3);
}

.deal-thumbnail {
    position: relative;
    aspect-ratio: 1/1;
    background-color: transparent; /* blend with card */
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.deal-thumbnail img {
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.deal-card:hover .deal-thumbnail img {
    transform: scale(1.05);
}

.deal-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.deal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deal-title a {
    color: var(--text-main);
}

.deal-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.star-rating {
    display: inline-flex;
    color: var(--primary-color);
}

.star-filled {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.rating-value {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.deal-price {
    margin-bottom: 1.25rem;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.deal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-affiliate {
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    background-color: var(--primary-color);
}

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

.link-details {
    width: 100%;
    text-align: center;
}

.small-disclaimer {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

/* =======================================
   Single Product / Deal Page
   ======================================= */
.product-page-main {
    padding: 3rem 0 5rem 0;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--primary-color);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.product-gallery {
    position: relative;
    top: 100px;
    align-self: start;
}

.main-image {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 1/1;
}

.product-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-info .product-price-box {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin: 1.5rem 0 2rem 0;
    padding: 1rem;
    background-color: var(--bg-surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.current-price {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 800;
}

.product-info .product-actions {
    margin-bottom: 2rem;
}

.btn-buy-amazon {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.25rem;
    background-color: var(--accent-color);
}

.btn-buy-amazon:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 106, 0, 0.4);
}

.trust-indicators {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.trust-indicators .badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.content-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.pros h3 {
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cons h3 {
    color: var(--error-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pros ul, .cons ul {
    list-style: none;
}

.pros li, .cons li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.pros li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.cons li::before {
    content: "×";
    position: absolute;
    left: 0;
    color: var(--error-color);
    font-weight: bold;
}

/* =======================================
   Responsive Design
   ======================================= */
@media (max-width: 1024px) {
    .header-container {
        grid-template-columns: auto 1fr auto auto;
    }
    
    .primary-menu-container {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-surface);
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    
    .primary-menu-container.active {
        display: block;
    }
    
    .primary-menu-container ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-toggle {
        display: block;
        padding: 0.5rem;
    }
    
    .hamburger-box { width: 30px; height: 24px; position: relative; }
    .hamburger-inner { 
        position: absolute; width: 100%; height: 2px; background: var(--text-main); 
        top: 50%; display: block; 
    }
    .hamburger-inner::before, .hamburger-inner::after {
        content: ""; position: absolute; width: 100%; height: 2px; background: var(--text-main); left: 0;
    }
    .hamburger-inner::before { top: -8px; }
    .hamburger-inner::after { bottom: -8px; }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-gallery {
        position: static;
    }

    .pros-cons-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        gap: 1rem;
    }
    
    .header-search {
        display: none; /* Might need a toggle on mobile or move below header */
    }
    
    .product-info h1 {
        font-size: 2rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
}
