/* ========================================
   CSS RESET & ROOT VARIABLES
======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #FFD700;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --bg-cream: #FAF7F2;
    --white: #FFFFFF;
    --border-color: #E5E5E5;
    --error-color: #DC3545;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --info-color: #17A2B8;
}

/* ========================================
   BASE STYLES
======================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Jost', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--white);
    min-height: 100vh;
}

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

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

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
}

input, select, textarea {
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
}

/* Premium form styling */
label {
    font-weight: 500;
    color: var(--text-dark);
}

.form-group {
    display: grid;
    gap: 6px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04) inset;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(132, 70, 20, 0.12);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

::placeholder {
    color: var(--text-light);
}

/* ========================================
   LAYOUT
======================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    min-height: 50vh;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: #6B3410;
    transform: translateY(-1px);
}

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

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

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

.btn-white:hover {
    background: var(--bg-cream);
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

/* ========================================
   UTILITIES
======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* ========================================
   TOP BAR
======================================== */
.top-bar {
    background: var(--text-dark);
    color: var(--white);
    font-size: 13px;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 20px;
}

.top-bar-left span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-bar-right a:hover {
    color: var(--accent-color);
}

/* ========================================
   MAIN HEADER
======================================== */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    gap: 35px;
}

.main-nav a {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-dark);
    position: relative;
}

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

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

.main-nav a:hover::after {
    width: 100%;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 14px;
    background: var(--white);
}

.search-bar button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 15px;
    background: transparent;
    color: var(--text-light);
}

.search-bar button:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon {
    position: relative;
    color: var(--text-dark);
    font-size: 20px;
}

.header-icon:hover {
    color: var(--primary-color);
}

.header-icon .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    color: var(--text-dark);
}

.mobile-search {
    display: none;
}

/* Mobile search panel (hidden by default, enabled via media query) */
.mobile-search-panel {
    display: none;
}

/* ========================================
   FOOTER
======================================== */
footer {
    background: var(--text-dark);
    color: var(--white);
    margin-top: 80px;
}

.footer-main {
    padding: 60px 0 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-col p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
}

.social-links a:hover {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--white);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--white);
    font-size: 14px;
    border-radius: 2px 0 0 2px;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-form button {
    padding: 12px 24px;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    border-radius: 0 2px 2px 0;
}

.newsletter-form button:hover {
    background: var(--accent-color);
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.payment-methods i {
    font-size: 28px;
    opacity: 0.6;
}

.footer-bottom {
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* ========================================
   BREADCRUMBS
======================================== */
.breadcrumbs {
    padding: 20px 0;
    background: var(--bg-cream);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb-list li a:hover {
    color: var(--primary-color);
}

.breadcrumb-list li:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--border-color);
}

/* ========================================
   MESSAGES / ALERTS
======================================== */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.alert-success { background: #D4EDDA; color: #155724; border-left: 4px solid var(--success-color); }
.alert-error { background: #F8D7DA; color: #721C24; border-left: 4px solid var(--error-color); }
.alert-warning { background: #FFF3CD; color: #856404; border-left: 4px solid var(--warning-color); }
.alert-info { background: #D1ECF1; color: #0C5460; border-left: 4px solid var(--info-color); }

.alert i { font-size: 20px; }
.alert-content { flex: 1; font-size: 14px; font-weight: 500; }
.alert-close { font-size: 18px; opacity: 0.7; cursor: pointer; padding: 0; }
.alert-close:hover { opacity: 1; }

/* ========================================
   PRODUCT CARD
======================================== */
.product-card {
    position: relative;
    background: var(--white);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
}

.product-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--bg-cream);
}

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

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

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 2px;
    text-transform: uppercase;
    z-index: 2;
}

.badge-sale { background: var(--error-color); color: var(--white); }
.badge-new { background: var(--success-color); color: var(--white); }

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 38px;
    height: 38px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 14px;
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    font-size: 12px;
}

.stars { color: var(--accent-color); }
.rating-count { color: var(--text-light); }

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.price-current {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.price-original {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-discount {
    font-size: 12px;
    color: var(--error-color);
    font-weight: 600;
}

/* ========================================
   SIDEBAR FILTERS
======================================== */
.filters-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--white);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"],
.filter-checkbox input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.filter-checkbox label {
    font-size: 14px;
    cursor: pointer;
    flex: 1;
    color: var(--text-dark);
}

.price-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.price-range-inputs input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 14px;
    width: 100%;
}

.filter-apply-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 500;
    margin-top: 15px;
    border-radius: 2px;
}

.filter-apply-btn:hover {
    background: #6B3410;
}

.clear-filters {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--primary-color);
    font-size: 13px;
    text-decoration: underline;
}

.clear-filters:hover {
    color: #6B3410;
}

/* ========================================
   PAGINATION
======================================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-light);
    margin: 0 15px;
}

/* ========================================
   QUICK VIEW MODAL
======================================== */
.quickview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.quickview-overlay.open {
    display: flex;
}

.quickview-modal {
    background: var(--white);
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

.quickview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    cursor: pointer;
}

.quickview-close:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quick-view-loading,
.quick-view-error {
    padding: 40px;
    text-align: center;
    color: var(--text-light);
}

.quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.quick-view-gallery img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-cream);
}

.quick-view-info .product-meta {
    display: flex;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.quick-view-info .product-title {
    font-size: 22px;
    font-weight: 700;
    margin: 6px 0;
}

.quick-view-info .rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.quick-view-info .price-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.quick-view-info .price-current {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.quick-view-info .price-original {
    font-size: 14px;
    text-decoration: line-through;
    color: var(--text-light);
}

.quick-view-info .price-discount {
    font-size: 13px;
    color: var(--error-color);
    font-weight: 600;
}

.quick-view-content .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .quick-view-content {
        grid-template-columns: 1fr;
    }

    .quickview-modal {
        padding: 16px;
    }
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar-left { display: none; }

.main-nav, .search-bar { display: none; }

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

    .header-content { gap: 15px; align-items: flex-start; }

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

    .filters-sidebar {
        position: static;
    }

    .mobile-search-panel {
        display: none;
        background: var(--white);
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
        position: sticky;
        top: 60px;
        z-index: 998;
    }

    .mobile-search-panel.active {
        display: block;
    }

    .mobile-search-panel .search-bar {
        display: block;
        max-width: none;
        width: 100%;
    }

    .mobile-search-panel .search-bar input {
        border-radius: 6px;
    }
}

@media (max-width: 768px) {
    .main-nav.mobile-open {
        display: block;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        z-index: 999;
    }

    .main-nav.mobile-open ul {
        flex-direction: column;
        gap: 12px;
    }

    .search-bar.mobile-open {
        display: block;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .container { padding: 0 15px; }

    .top-bar-content { justify-content: center; }

    .logo { font-size: 22px; }
}

