/* Market / Customer Theme (Clean & Modern) */
:root {
    --bg-body: #f8f9fa;
    --text-main: #212529;
    --text-muted: #6c757d;
    --primary: #c62828;
    /* Brand Red */
    --primary-hover: #b71c1c;
    --secondary: #6c757d;
    --danger: #dc3545;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
}

/* Navbar adjustments if needed */
.navbar-brand {
    letter-spacing: -0.5px;
}

/* Sticky Header for Market Header */
.navbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
    animation: slideDown 300ms ease-out;
    transition: all 300ms ease;
}

.navbar.sticky.shadow {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.hidden {
    animation: slideUp 300ms ease-out;
    transform: translateY(-100%);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Add padding to body when header is sticky */
body.header-sticky {
    padding-top: 76px; /* Adjust based on header height */
}

body.header-sticky-compact {
    padding-top: 60px; /* Adjust for compact mode */
}

/* Mobile Responsiveness for Header */
@media (max-width: 768px) {
    .navbar {
        padding: calc(var(--theme-spacing-unit, 8px) * 0.75) 0;
    }
    
    .navbar-brand {
        font-size: calc(var(--theme-font-size-base, 16px) * 1.125);
    }
    
    .navbar-nav {
        margin-top: calc(var(--theme-spacing-unit, 8px) * 1);
    }
    
    .navbar .d-flex {
        flex-wrap: wrap;
        gap: calc(var(--theme-spacing-unit, 8px) * 0.5);
    }
    
    .navbar .btn-sm {
        padding: calc(var(--theme-spacing-unit, 8px) * 0.5) calc(var(--theme-spacing-unit, 8px) * 1);
        font-size: calc(var(--theme-font-size-base, 16px) * 0.875);
    }
    
    .location-banner {
        padding: calc(var(--theme-spacing-unit, 8px) * 0.5) 0;
        font-size: calc(var(--theme-font-size-base, 16px) * 0.875);
    }
    
    body.header-sticky {
        padding-top: 120px; /* Adjust for mobile header + banner */
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: calc(var(--theme-spacing-unit, 8px) * 0.5) 0;
    }
    
    .navbar-brand {
        font-size: calc(var(--theme-font-size-base, 16px) * 1);
    }
    
    .navbar .btn-sm {
        padding: calc(var(--theme-spacing-unit, 8px) * 0.4) calc(var(--theme-spacing-unit, 8px) * 0.75);
        font-size: calc(var(--theme-font-size-base, 16px) * 0.75);
    }
    
    .location-banner {
        padding: calc(var(--theme-spacing-unit, 8px) * 0.4) 0;
        font-size: calc(var(--theme-font-size-base, 16px) * 0.75);
    }
    
    body.header-sticky {
        padding-top: 100px; /* Adjust for compact mobile header */
    }
}

/* Cards */
.card {
    border: 2px solid #c62828 !important;
    /* Brand Red Border Force */
    box-shadow: none;
    /* Flatter design */
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--card-shadow);
}

/* Product Grid Adjustments */
.product-card-img-wrapper {
    background: #fff;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Featured Products Styling */
.featured-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 0 0 0 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

.featured-badge i {
    font-size: 0.7rem;
}

/* Featured Product Card Styling */
.card.featured-product-card {
    border: 2px solid #ffc107 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.featured-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

/* Featured Products Section Title */
.featured-products-section h5 {
    color: #333;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-products-section h5 .fa-star {
    color: #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Product Description Styling (for HTML content from Quill editor) */
.product-description {
    line-height: 1.6;
}

.product-description p {
    margin-bottom: 0.75rem;
}

.product-description p:last-child {
    margin-bottom: 0;
}

.product-description strong {
    font-weight: 600;
    color: var(--text-main);
}

.product-description ul,
.product-description ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.product-description li {
    margin-bottom: 0.5rem;
}

.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5,
.product-description h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-description a {
    color: var(--primary);
    text-decoration: none;
}

.product-description a:hover {
    text-decoration: underline;
}

.product-description img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
    margin: 1rem 0;
}