/**
 * Uno's Jerky - Main Styles
 * Dark, sophisticated e-commerce theme
 */

:root {
    --color-bg: #0a0a0a;
    --color-surface: #141414;
    --color-surface-hover: #1a1a1a;
    --color-surface-alt: #1e1e1e;
    --color-border: #2a2a2a;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-text-light: #666666;
    --color-primary: #E91E63;
    --color-primary-hover: #C2185B;
    --color-success: #4CAF50;
    --color-warning: #FF9800;
    --color-error: #f44336;

    --max-width: 1200px;
    --header-height: 70px;
    --border-radius: 8px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

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

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

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.logo:hover {
    color: var(--color-text);
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-main a {
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color var(--transition);
}

.nav-main a:hover,
.nav-main a.active {
    color: var(--color-text);
}

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

.cart-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: all var(--transition);
}

.cart-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.cart-count {
    background: var(--color-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
}

/* Announcement Banner */
.announcement-banner {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
}

.announcement-banner a {
    color: inherit;
    text-decoration: underline;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 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: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn .material-icons {
    font-size: 20px;
}

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

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

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

.btn-outline:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

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

/* Product Card */
.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition);
}

.product-card:hover {
    border-color: var(--color-text-muted);
    transform: translateY(-2px);
}

.product-card-image {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-surface-alt);
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    color: white;
}

.product-badge .material-icons {
    font-size: 14px;
}

.product-card-body {
    padding: 1.25rem;
}

.product-card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.product-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-card-title a {
    color: var(--color-text);
}

.product-card-title a:hover {
    color: var(--color-primary);
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.product-card-price .compare-price {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* Stock Status */
.stock-status {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stock-in { color: var(--color-success); }
.stock-low { color: var(--color-warning); }
.stock-out { color: var(--color-error); }

/* Sold Out Product Card */
.product-card.sold-out .product-card-image img {
    opacity: 0.5;
    filter: grayscale(50%);
}

.sold-out-badge {
    background: #6B7280 !important;
}

.product-card.sold-out .product-card-price {
    color: var(--color-text-muted);
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-surface);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: all var(--transition);
}

.category-card:hover img {
    opacity: 0.4;
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.category-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid var(--color-warning);
    color: var(--color-warning);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* Footer */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.social-links a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--color-text-muted);
}

.footer-column a:hover {
    color: var(--color-text);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Cart Page */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

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

.cart-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

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

.cart-item-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-variant {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition);
}

.quantity-control button:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-text-muted);
}

.quantity-control input {
    width: 50px;
    text-align: center;
    padding: 0.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text);
}

.cart-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.cart-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: var(--color-text-muted);
}

.cart-summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.product-gallery {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.product-gallery-main {
    aspect-ratio: 4/3;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-surface);
    margin-bottom: 1rem;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.product-gallery-thumbs button {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition);
}

.product-gallery-thumbs button.active,
.product-gallery-thumbs button:hover {
    border-color: var(--color-primary);
}

.product-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-info .category {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.product-price .compare {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
    margin-left: 0.75rem;
}

.variant-selector {
    margin-bottom: 1.5rem;
}

.variant-selector label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-option {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition);
}

.variant-option:hover {
    border-color: var(--color-text-muted);
}

.variant-option.active {
    border-color: var(--color-primary);
    background: rgba(233, 30, 99, 0.1);
}

.variant-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-to-cart-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-description {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.product-description h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.product-detail-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.product-detail-item h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* Heat Level */
.heat-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .nav-main {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        order: 3;
    }

    .nav-main.open {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

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

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

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

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .cart-table {
        display: block;
        width: 100%;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        padding: 1rem;
        background: var(--color-surface);
        border-radius: var(--border-radius);
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        width: 100%;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text-muted);
    }

    /* Cart page grid - stack on mobile */
    .cart-table td[data-label="Product"] {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-table td[data-label="Product"]::before {
        display: none;
    }

    /* Remove button - full width on mobile */
    .cart-table td:last-child {
        justify-content: flex-end;
    }

    .cart-table td:last-child::before {
        display: none;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    /* Shop page sidebar - hide on mobile, show as collapsible */
    body > main > .container > div[style*="grid-template-columns: 250px"] {
        display: block !important;
    }

    body > main > .container > div[style*="grid-template-columns: 250px"] > aside {
        margin-bottom: 1.5rem;
    }

    body > main > .container > div[style*="grid-template-columns: 250px"] > aside > div {
        position: static !important;
    }

    /* Quantity controls */
    .quantity-control {
        min-width: 100px;
    }

    .quantity-control input {
        width: 40px;
    }

    /* Buttons */
    .btn-block {
        width: 100%;
    }

    /* Cart summary on mobile */
    .cart-summary {
        margin-top: 1.5rem;
    }

    /* Info pages */
    .container[style*="max-width: 800px"] {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Product detail */
    .product-info h1 {
        font-size: 1.5rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .add-to-cart-form {
        flex-direction: column;
    }

    .add-to-cart-form .btn {
        width: 100%;
    }

    .variant-options {
        flex-wrap: wrap;
    }

    .variant-option {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 120px;
    }

    /* Product details grid */
    .product-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.cart-layout > div {
    min-width: 0; /* Prevent grid blowout */
}

@media (max-width: 900px) {
    .cart-layout {
        display: block;
    }

    .cart-layout > div {
        width: 100%;
    }

    .cart-layout > div:first-child {
        margin-bottom: 2rem;
    }

    #cartForm {
        width: 100%;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-card-image {
        height: 140px;
    }

    .product-card-content {
        padding: 0.75rem;
    }

    .product-card h3 {
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Cart page - full width columns */
    .cart-table td {
        font-size: 0.9rem;
    }

    .cart-summary h3 {
        font-size: 1.1rem;
    }

    /* Form controls */
    .form-row {
        flex-direction: column;
    }

    /* Gallery thumbnails */
    .product-gallery-thumbs {
        gap: 0.5rem;
    }

    .product-gallery-thumbs button {
        width: 50px;
        height: 50px;
    }
}
