/* ===== VARIABLES ===== */
:root {
    --primary: #8B5E3C;
    --primary-dark: #6D4A2E;
    --primary-light: #C4956A;
    --secondary: #2C3E50;
    --accent: #E67E22;
    --success: #27AE60;
    --light: #FDF6EC;
    --cream: #FAF3E6;
    --dark: #2C2C2C;
    --gray: #6C757D;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

/* ===== BASE ===== */
body {
    font-family: var(--font-body);
    color: var(--dark);
    background-color: #FEFCF9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* ===== TOP BAR ===== */
.top-bar {
    background-color: var(--secondary);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar a {
    color: white;
    text-decoration: none;
}

.top-bar a:hover {
    color: var(--primary-light);
}

/* ===== NAVBAR ===== */
.navbar {
    padding: 15px 0;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary);
}

.nav-link {
    font-weight: 500;
    color: var(--secondary) !important;
    padding: 8px 16px !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.nav-icon-link {
    color: var(--secondary);
    font-size: 1.2rem;
}

.nav-icon-link:hover {
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    font-size: 0.65rem;
    padding: 3px 6px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--cream) 0%, var(--light) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 94, 60, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-image {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-width: 100%;
    height: auto;
}

/* ===== SECTION STYLES ===== */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--gray);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 15px auto 30px;
}

/* ===== CATEGORY CARDS ===== */
.category-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0ebe3;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: var(--primary);
}

.category-card h6 {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--secondary);
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0ebe3;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 260px;
    background: var(--cream);
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.08);
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.product-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.badge-sale {
    background: #E74C3C;
    color: white;
}

.badge-new {
    background: var(--success);
    color: white;
}

.badge-featured {
    background: var(--accent);
    color: white;
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    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);
}

.product-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s;
    color: var(--secondary);
}

.product-action-btn:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.78rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 8px 0;
}

.product-title a {
    color: var(--secondary);
}

.product-title a:hover {
    color: var(--primary);
}

.product-artisan {
    font-size: 0.82rem;
    color: var(--gray);
}

.product-price {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-current {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.price-old {
    font-size: 0.95rem;
    color: #999;
    text-decoration: line-through;
}

.price-discount {
    font-size: 0.78rem;
    background: #fde8e8;
    color: #E74C3C;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===== FEATURES SECTION ===== */
.feature-box {
    text-align: center;
    padding: 30px 20px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.6rem;
    color: var(--primary);
}

/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail-img {
    border-radius: 15px;
    overflow: hidden;
    background: var(--cream);
}

.product-detail-img img {
    width: 100%;
    height: auto;
}

.product-detail-info .product-title {
    font-size: 2rem;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.quantity-selector button {
    background: var(--light);
    border: none;
    padding: 10px 15px;
    font-size: 1.1rem;
    cursor: pointer;
}

.quantity-selector input {
    border: none;
    width: 60px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.nav-tabs .nav-link {
    color: var(--secondary);
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-color: var(--primary);
    border-bottom-color: white;
}

/* ===== CART PAGE ===== */
.cart-table th {
    background: var(--light);
    font-weight: 600;
    border: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-summary {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0ebe3;
}

/* ===== FORMS ===== */
.auth-form {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 94, 60, 0.15);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--secondary);
    color: #ccc;
}

.footer-top {
    padding: 60px 0 30px;
}

.footer-title {
    font-family: var(--font-heading);
    color: white;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.footer-subtitle {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    font-size: 0.85rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-section {
    background: var(--light);
    padding: 20px 0;
    border-bottom: 1px solid #ece3d5;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary);
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--cream) 0%, var(--light) 100%);
    padding: 50px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--secondary);
    font-size: 2.5rem;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    color: var(--primary);
    border-radius: 8px;
    margin: 0 3px;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== SIDEBAR FILTERS ===== */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0ebe3;
    margin-bottom: 20px;
}

.filter-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

/* ===== ADMIN ===== */
.admin-sidebar {
    background: var(--secondary);
    min-height: 100vh;
    padding-top: 20px;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    padding: 12px 20px !important;
    border-radius: 8px;
    margin: 2px 10px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white !important;
}

.admin-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border: none;
    margin-bottom: 20px;
}

.stat-card {
    border-radius: 15px;
    padding: 25px;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -10px;
    top: -10px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-section {
        padding: 50px 0;
        text-align: center;
    }

    .top-bar .text-end {
        text-align: center !important;
        margin-top: 5px;
    }

    .product-image-wrapper {
        height: 200px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== MISC ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending { background: #FEF3CD; color: #856404; }
.status-processing { background: #CCE5FF; color: #004085; }
.status-shipped { background: #D4EDDA; color: #155724; }
.status-delivered { background: #D1ECF1; color: #0C5460; }
.status-cancelled { background: #F8D7DA; color: #721C24; }

/* ===== PAYMENT METHOD ICONS ===== */
.payment-methods {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.payment-methods i {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: default;
}

.payment-methods i:hover {
    color: white;
    transform: scale(1.15);
}

/* Individual brand colors on hover */
.payment-methods .fa-cc-visa:hover { color: #1a1f71; }
.payment-methods .fa-cc-mastercard:hover { color: #eb001b; }
.payment-methods .fa-cc-amex:hover { color: #2e77bc; }
.payment-methods .fa-cc-paypal:hover { color: #003087; }
.payment-methods .fa-cc-stripe:hover { color: #635bff; }
.payment-methods .fa-cc-apple-pay:hover { color: #ffffff; }
.payment-methods .fa-google-pay:hover { color: #4285f4; }

/* ===== TRUST BADGES ===== */
.trust-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #aaa;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.trust-badge i {
    color: var(--primary-light);
}

/* ===== NEWSLETTER FORM FIX ===== */
.newsletter-form .form-control {
    border-radius: 8px 0 0 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    color: white;
    box-shadow: none;
}

.newsletter-form .btn {
    border-radius: 0 8px 8px 0;
}