/**
 * MBdesigns Custom Styles
 * Artisan Craft Theme
 */

:root {
    --primary-color: #C85A3A; /* Terracotta */
    --secondary-color: #8B9A5B; /* Sage green */
    --accent-color: #8B2E3C; /* Burgundy */
    --bg-color: #FAF8F5; /* Off-white */
    --text-color: #3A3A3A;
    --light-bg: #FFFFFF;
    --border-color: #E5E5E5;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Open Sans', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-color);
}

/* Buttons - Modern Styling */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(200, 90, 58, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 90, 58, 0.4);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

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

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(200, 90, 58, 0.3);
}

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

/* Modern Card Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Cards - Modern Styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(200, 90, 58, 0.15);
    border-color: var(--primary-color);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid rgba(200, 90, 58, 0.1);
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Product Cards - Enhanced */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(200, 90, 58, 0.05) 0%, rgba(139, 154, 91, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card .card-body {
    position: relative;
    z-index: 2;
    background: white;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 16px 16px 0 0;
}

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

.product-card .card-title {
    transition: color 0.3s ease;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

.product-card .btn {
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.product-card:hover .btn {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 90, 58, 0.3);
}

.sale-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #A83A4C 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(139, 46, 60, 0.4);
    animation: pulse 2s ease-in-out infinite;
    letter-spacing: 0.5px;
}

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

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 10px;
}

.sale-price {
    color: var(--accent-color);
    font-size: 1.25rem;
    font-weight: bold;
}

.savings {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: bold;
}

/* Navigation */
.navbar {
    background-color: var(--light-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-color) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(200, 90, 58, 0.25);
}

/* Footer */
footer {
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Category Cards */
.categories .card {
    border-radius: 12px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.categories .card:hover {
    background: linear-gradient(135deg, rgba(200, 90, 58, 0.05) 0%, rgba(139, 154, 91, 0.05) 100%);
}

.categories .card-title {
    transition: color 0.3s ease;
}

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

/* Section Animations */
section {
    animation: fadeIn 0.8s ease-out;
}

section h2 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    animation: slideInRight 0.6s ease-out 0.3s both;
}

/* Featured Products Section */
.featured-products .row {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Badge Animations */
.badge {
    animation: fadeIn 0.5s ease-out;
    transition: transform 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Form Inputs - Modern */
.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(200, 90, 58, 0.15);
    transform: translateY(-1px);
}

/* Alert Animations */
.alert {
    border-radius: 10px;
    border: none;
    animation: slideInRight 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Navbar Enhancements */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Footer Enhancements */
footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 2px solid rgba(200, 90, 58, 0.1);
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for seller cards */
.featured-sellers .col-12[data-animation-delay] {
    transition-delay: calc(var(--animation-delay, 0) * 1s);
}

.featured-sellers .col-12:nth-child(1) {
    --animation-delay: 0.1;
}

.featured-sellers .col-12:nth-child(2) {
    --animation-delay: 0.2;
}

.featured-sellers .col-12:nth-child(3) {
    --animation-delay: 0.3;
}

.featured-sellers .col-12:nth-child(4) {
    --animation-delay: 0.4;
}

.featured-sellers .col-12:nth-child(5) {
    --animation-delay: 0.5;
}

.featured-sellers .col-12:nth-child(6) {
    --animation-delay: 0.6;
}

/* Ensure seller section cards animate */
.featured-sellers .seller-section-card.animate-on-scroll {
    transition-delay: inherit;
}

.featured-sellers .seller-section-card.animate-on-scroll.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Utility Classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Seller Cards - Enhanced Layout */
.seller-section-card {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 0;
}

.seller-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

.featured-sellers .row {
    margin-bottom: 2rem;
}

.featured-sellers .col-12:not(:last-child) {
    margin-bottom: 2rem;
}

.seller-header-gradient {
    position: relative;
}

.seller-header-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

.seller-logo-wrapper {
    position: relative;
    flex-shrink: 0;
}

.seller-logo-main {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.seller-section-card:hover .seller-logo-main {
    transform: scale(1.05);
}

.seller-logo-placeholder {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.seller-stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.seller-stats-inline .badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 8px;
}

.seller-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 16px;
}

.seller-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(200, 90, 58, 0.2) !important;
}

.seller-card .seller-logo-main {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.product-image-wrapper {
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #f8f9fa;
}

.product-image-wrapper .product-image {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Featured Sellers Section */
.featured-sellers {
    padding: 3rem 0;
}

.featured-sellers h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.featured-sellers h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .product-image {
        height: 200px;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card:nth-child(n) {
        animation-delay: 0s;
    }
    
    section h2::after {
        width: 40px;
    }
    
    .seller-logo-main {
        width: 80px;
        height: 80px;
    }
    
    .seller-header-gradient {
        padding: 1.5rem !important;
    }
    
    .seller-stats-inline {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .seller-stats-inline .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .featured-sellers h2 {
        font-size: 2rem;
    }
    
    .featured-sellers {
        padding: 2rem 0;
    }
    
    .seller-section-card {
        margin-bottom: 2rem;
    }
    
    .seller-header-gradient h3 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .seller-header-gradient .text-muted {
        text-align: center;
        font-size: 0.875rem;
    }
    
    /* Product cards in seller section */
    .featured-sellers .product-card {
        margin-bottom: 1.5rem;
    }
    
    .featured-sellers .col-lg-4 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .seller-header-gradient {
        padding: 1rem !important;
    }
    
    .seller-logo-main {
        width: 70px;
        height: 70px;
    }
    
    .seller-header-gradient h3 {
        font-size: 1.25rem;
    }
    
    .seller-stats-inline {
        flex-direction: column;
        align-items: center;
    }
    
    .seller-stats-inline .badge {
        width: 100%;
        text-align: center;
        margin-bottom: 0.25rem;
    }
    
    .featured-sellers .card-body {
        padding: 1rem;
    }
    
    .featured-sellers h5 {
        font-size: 1rem;
    }
}

