/* assets/css/style.css */

:root {
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --accent: #e67e22;
    --accent-dark: #c8690f;
    --bg-light: #f9f9f9;
    --text-main: #333;
    --text-muted: #7f8c8d;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --border: #ddd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background: var(--bg-light);
    line-height: 1.6;
}

a { color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ==================== Header / Nav ==================== */
header { background: var(--primary); color: #fff; padding: 1rem 0; }
header .container { display: flex; justify-content: space-between; align-items: center; }
header a { color: #fff; text-decoration: none; font-weight: bold; }

nav { display: flex; align-items: center; }
nav a {
    margin-left: 1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    transition: background 0.15s ease;
}
nav a:hover,
nav a:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

/* Mobile nav toggle — hidden checkbox + label pattern, no JS required */
.nav-toggle { display: none; }
.nav-toggle-label {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 640px) {
    .nav-toggle-label { display: block; }
    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        background: var(--primary-dark);
        position: absolute;
        left: 0;
        top: 100%;
        padding: 0.5rem 0;
        z-index: 20;
    }
    nav a { margin: 0; padding: 0.75rem 1rem; border-radius: 0; }
    header .container { position: relative; flex-wrap: wrap; }
    .nav-toggle:checked ~ nav { display: flex; }
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    transition: background 0.15s ease;
}
.btn:hover,
.btn:focus-visible {
    background: var(--accent-dark);
    outline: none;
}
.btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}
.btn:disabled:hover { background: #95a5a6; }
.btn-block { display: block; width: 100%; }
.btn-muted { background: var(--text-muted); }
.btn-muted:hover, .btn-muted:focus-visible { background: #6c7a7b; }
.btn-danger { background: var(--danger); }
.btn-danger:hover, .btn-danger:focus-visible { background: #c0392b; }

/* ==================== Forms ==================== */
label { display: block; font-weight: bold; margin-bottom: 0.35rem; font-size: 0.9rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-main);
    transition: border-color 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(230, 126, 34, 0.25);
    outline-offset: 1px;
}
textarea { resize: vertical; min-height: 100px; }

.form-group { margin-bottom: 1.25rem; }
.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}
input.has-error,
select.has-error,
textarea.has-error {
    border-color: var(--danger);
}

.filters { background: #fff; padding: 1rem; border-radius: 8px; margin-top: 1rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.filters input, .filters select { width: auto; flex: 1 1 180px; }

/* ==================== Alerts / Messages ==================== */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
}
.alert-success { background: #eafaf1; border-color: var(--success); color: #1e8449; }
.alert-error   { background: #fdedec; border-color: var(--danger);  color: #b03a2e; }
.alert-warning { background: #fef5e7; border-color: var(--warning); color: #9c6b0a; }
.alert-info    { background: #eaf2f8; border-color: var(--primary); color: var(--primary); }

/* ==================== Product Grid ==================== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; padding: 2rem 0; }

.product-card-link { text-decoration: none; color: inherit; display: block; }

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card-link:hover .product-card,
.product-card-link:focus-visible .product-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-card-body { padding: 1rem; flex-grow: 1; display: flex; flex-direction: column; }
.product-card-title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.product-card-price { font-weight: bold; color: var(--accent); font-size: 1.2rem; margin-top: auto; }

/* ==================== Single Product ==================== */
.single-product { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0; }
@media (min-width: 768px) { .single-product { grid-template-columns: 1fr 1fr; } }

.product-gallery img { width: 100%; border-radius: 8px; margin-bottom: 1rem; object-fit: cover; }

.product-category-label { text-transform: uppercase; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.product-badges { margin: 1rem 0; }
.product-price-heading { color: var(--accent); margin-bottom: 1rem; }
.product-meta-box { background: #f1f2f6; padding: 1rem; border-radius: 5px; margin-bottom: 1rem; font-size: 0.9rem; }
.product-meta-box p + p { margin-top: 0.35rem; }
.product-description { margin-bottom: 2rem; white-space: pre-wrap; }

.original-price { text-decoration: line-through; color: var(--text-muted); font-size: 0.9rem; margin-left: 0.5rem; }

/* ==================== Badges ==================== */
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.8rem; font-weight: bold; background: #eee; color: var(--text-main); }
.badge.available { background: var(--success); color: white; }
.badge.reserved   { background: var(--warning); color: white; }
.badge.sold       { background: var(--danger); color: white; }

/* ==================== Utility ==================== */
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }