/* Custom classes for moved inline styles from create_page.html */
.navbar-custom {
    z-index: 1030;
    width: 100%;
}
.svg-offscreen {
    position: absolute;
    left: -9999px;
}
.password-padding {
    padding-right: 45px;
}
.toggle-password-btn {
    z-index: 10;
    padding: 0.375rem 0.75rem;
}
.footer-center {
    text-align: center;
}
.footer-margin {
    margin-bottom: 0.5rem;
}
.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.footer-link {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.footer-link:hover, .footer-link:focus {
    opacity: 1;
}
.footer-link-social {
    opacity: 0.9;
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 0 .35rem;
}
.footer-link-social:hover, .footer-link-social:focus {
    opacity: 1;
}
/* Ensure promo cards are visible and styled */
.promo-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}
/* Global Styles */
:root {
    --primary-600: #6B8E6B;
    --primary-500: #8BA888;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --accent: var(--primary-600);
    --muted: #666666;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #333333;
    --danger: #dc3545;
    --success: #28a745;
    --dark: #2c3e50;
    --shadow: rgba(0, 0, 0, 0.1);
    --primary-shadow: rgba(107, 142, 107, 0.35);

    /* Brand-compatible aliases for themes (map legacy vars to new brand vars) */
    --brand-primary: var(--primary-600);
    --brand-accent: var(--accent);
    --brand-gradient: var(--primary-gradient);

    /* Navbar foreground (links/avatar) — themes may override */
    --nav-foreground: rgba(255, 255, 255, 0.92);
}

/* Theme variable overrides (client-selectable) */
[data-theme="artisan"] {
    --brand-primary: #8B4513;
    /* brown */
    --brand-accent: #a66e42;
    /* tuned caramel for better contrast */
    --primary-600: #8B4513;
    --primary-500: #C68649;
    --accent: var(--brand-accent);
    --bg: #FFF8F2;
    --card-bg: #ffffff;
    --text: #222222;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(139, 69, 19, 0.28);
}

[data-theme="patisserie"] {
    --brand-primary: #C77AB3;
    /* orchid */
    --brand-accent: #F7D6E0;
    /* soft pink */
    --primary-600: #C77AB3;
    --primary-500: #e69ec6;
    --accent: var(--brand-accent);
    --bg: #FFF7FB;
    --card-bg: #FFFFFF;
    --text: #2B2B2B;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(199, 122, 179, 0.28);
}

[data-theme="sunny"] {
    --brand-primary: #FFB020;
    /* sunny orange */
    --brand-accent: #FFDB6C;
    /* sun */
    --primary-600: #FFB020;
    --primary-500: #ffc64a;
    --accent: var(--brand-accent);
    --bg: #FFFAF0;
    --card-bg: #FFFFFF;
    --text: #2B2B2B;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(255, 176, 32, 0.28);
    /* light navbar needs dark foreground */
    --nav-foreground: #222222;
}

[data-theme="classic"] {
    --brand-primary: #A0522D;
    /* sienna */
    --brand-accent: #F0935B;
    /* warm apricot */
    --primary-600: #A0522D;
    --primary-500: #bf7f58;
    --accent: var(--brand-accent);
    --bg: #FFF9F5;
    --card-bg: #FFFFFF;
    --text: #2B2B2B;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(160, 82, 45, 0.28);
}

[data-theme="minimal"] {
    --brand-primary: #111827;
    /* charcoal */
    --brand-accent: #10B981;
    /* mint */
    --primary-600: #111827;
    --primary-500: #444b54;
    --accent: var(--brand-accent);
    --bg: #ffffff;
    --card-bg: #ffffff;
    --text: #111827;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(17, 24, 39, 0.28);
    /* navbar links on this dark primary should be light */
    --nav-foreground: #ffffff;
}

/* New themes */
[data-theme="farmhouse"] {
    --brand-primary: #6B4226;
    /* espresso */
    --brand-accent: #BFA07A;
    /* wheat */
    --primary-600: #6B4226;
    --primary-500: #9b6f4e;
    --accent: var(--brand-accent);
    --bg: #F7F4EE;
    --card-bg: #FCFBF8;
    --text: #2B2B2B;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(107, 66, 38, 0.28);
}

[data-theme="retro"] {
    --brand-primary: #C2185B;
    /* rose */
    --brand-accent: #2AB7CA;
    /* teal */
    --primary-600: #C2185B;
    --primary-500: #e25b85;
    --accent: var(--brand-accent);
    --bg: #FFF6F9;
    --card-bg: #FFF8FB;
    --text: #3B3B3B;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(194, 25, 91, 0.28);
}

[data-theme="market"] {
    --brand-primary: #2F9E44;
    /* green */
    --brand-accent: #D99A1E;
    /* darker gold for better contrast */
    --primary-600: #2F9E44;
    --primary-500: #6bc86b;
    --accent: var(--brand-accent);
    --bg: #FAFFF5;
    --card-bg: #FFFFFF;
    --text: #1A1A1A;
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    --primary-shadow: rgba(47, 158, 68, 0.28);
}

/* Premium Toast Styles */
#toast-container {
    padding: 1.5rem;
    pointer-events: none;
    z-index: 2050 !important;
}

#toast-container>* {
    pointer-events: auto;
}

.premium-toast {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    margin-bottom: 1rem;
    overflow: hidden;
    min-width: 320px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-toast.hide {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
}

.premium-toast .toast-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    font-weight: 700;
}

.premium-toast .toast-body {
    padding: 1rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.premium-toast .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--brand-primary);
    width: 100%;
    opacity: 0.6;
}

/* Toast Variants */
.premium-toast-success .toast-header {
    color: #28a745;
}

.premium-toast-success .toast-progress {
    background: #28a745;
}

.premium-toast-danger .toast-header {
    color: #dc3545;
}

.premium-toast-danger .toast-progress {
    background: #dc3545;
}

.premium-toast-warning .toast-header {
    color: #ffc107;
}

.premium-toast-warning .toast-progress {
    background: #ffc107;
}

.premium-toast-info .toast-header {
    color: #17a2b8;
}

.premium-toast-info .toast-progress {
    background: #17a2b8;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.toast-progress.active {
    animation: toastProgress linear forwards;
}

/* Fix icon alignment */
.input-group-text i {
    font-size: 1.1rem;
    line-height: 1.5;
}

.input-group-text {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

/* Fix icon alignment */
.input-group-text i {
    font-size: 1.1rem;
    line-height: 1.5;
}

.input-group-text {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}



fieldset {
    border: 1px solid rgba(0, 0, 0, 0.15);
    /* very thin light border */
    padding: 20px;
    border-radius: 6px;
}

/* Fieldset styling */
fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
}

/* Terms & Conditions checkbox styling */
.form-check-input.accept-terms {
    /* Use accent-color for modern browsers to make checkbox darker */
    accent-color: rgba(0, 0, 0, 0.65);
}

.form-check-input.accept-terms:focus {
    outline: 3px solid rgba(0, 0, 0, 0.06);
    outline-offset: 2px;
    border-radius: 4px;
}

.form-check-label.accept-terms-label {
    color: rgba(0, 0, 0, 0.85);
}

.accept-terms-error {
    margin-top: 0.25rem;
    display: block;
    font-weight: 600;
}

legend {
    width: auto;
    padding: 0 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Navigation */
.navbar {
    background: var(--brand-gradient, var(--primary-gradient));
    color: white;
    box-shadow: 0 2px 4px var(--shadow);
    z-index: 1100;
    /* ensure navbar is above other content */
}

/* Ensure dropdowns appear above overlays (like modals/tooltips) */
.dropdown-menu {
    z-index: 2000;
}

/* Navbar collapse should allow overflow so dropdowns aren't clipped */
.navbar .collapse {
    overflow: visible;
}

/* Make dropdown positioned correctly inside the navbar and visible/clickable */
.navbar .dropdown {
    position: relative;
}

.navbar .dropdown .dropdown-menu {
    position: absolute;
}

/* Center brand and keep it slightly spaced from nav on wide screens */
.navbar .navbar-brand {
    margin-right: 1.25rem;
}

/* Brand badge that contains icon + text so both edges match */
#stName {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 1.2rem;
    /* space for icon + text */
    border-radius: 0.75rem;
    background: var(--brand-gradient, linear-gradient(90deg, var(--brand-primary, #ff7a59), var(--brand-accent, #ffd166)));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
    transform: translateY(-3px) scale(1.03);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 900;
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    user-select: none;
}

#stName i {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.98);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.16));
}

@media (max-width: 1200px) {
    #stName {
        padding: 0.44rem 0.95rem;
        border-radius: 0.65rem;
    }

    #stName {
        font-size: 1.35rem;
    }

    #stName i {
        font-size: 1.15rem;
    }
}

@media (max-width: 992px) {
    #stName {
        padding: 0.36rem 0.78rem;
    }

    #stName {
        font-size: 1.15rem;
    }

    #stName i {
        font-size: 1.05rem;
    }
}

@media (max-width: 576px) {
    #stName {
        padding: 0.22rem 0.5rem;
        border-radius: 0.45rem;
    }

    #stName {
        font-size: 0.98rem;
    }

    #stName i {
        font-size: 0.95rem;
    }
}

/* Apply SVG mask for perfect rounded edges; include clip-path fallback */
#stName {
    -webkit-mask: url(#brand-mask);
    mask: url(#brand-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    /* Fallback for browsers that don't support SVG masks */
    clip-path: inset(0 round 0.75rem);
}

/* Reduce mask corner radius slightly on small screens to preserve proportion */
@media (max-width: 576px) {
    #stName {
        -webkit-mask: url(#brand-mask);
        mask: url(#brand-mask);
        /* The mask uses objectBoundingBox units, so rx is relative; keep fallback clip-path */
        clip-path: inset(0 round 0.45rem);
    }
}

/* Slightly increase nav link spacing for center-aligned layout */
.navbar-nav .nav-link {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

/* Modern GitHub-style glass navbar */
.navbar.glass {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    /* Use theme color as base and overlay a subtle glass gradient */
    background-color: var(--brand-primary);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

/* Theme-aware navbar (handles non-glass navbars or when JS hasn't added glass) */
.navbar.theme-navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background-color: var(--brand-primary);
}

.navbar.theme-navbar .nav-link,
.navbar.theme-navbar .avatar,
.navbar.theme-navbar .icon-btn {
    color: var(--nav-foreground);
}


/* When scrolled / compact state */
.navbar.glass.navbar-scrolled,
.navbar.theme-navbar.navbar-scrolled {
    /* Keep theme color when compacted instead of switching to a generic translucent white */
    background-color: var(--brand-primary);
    /* Subtle glass overlay to preserve the glass effect on scroll */
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(0);
}

/* Compact links and hover */
.navbar.glass .nav-link {
    color: var(--nav-foreground);
    padding: .45rem .65rem;
    border-radius: 0.40rem;
    transition: background .18s ease, color .18s ease, transform .12s ease;
}

.navbar.glass .nav-link:hover,
.navbar.glass .nav-link:focus {
    background: rgba(255, 255, 255, 0.04);
    color: var(--nav-foreground);
    transform: translateY(-1px);
}

/* Right-side controls (theme + avatar) */
.navbar .nav-controls {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.navbar .icon-btn {
    background: transparent;
    border: none;
    color: var(--nav-foreground);
    padding: .36rem .5rem;
    border-radius: .375rem;
    cursor: pointer;
    transition: background .15s ease, transform .12s ease;
}

.navbar .icon-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

/* Avatar */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Animated hamburger */
.navbar-toggler.custom-toggler {
    border: none;
    padding: .3rem;
}

.navbar-toggler.custom-toggler .hamburger {
    width: 26px;
    height: 2px;
    background: #fff;
    display: block;
    position: relative;
    transition: transform .28s ease;
}

.navbar-toggler.custom-toggler .hamburger::before,
.navbar-toggler.custom-toggler .hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: transform .28s ease, top .28s ease, bottom .28s ease;
}

.navbar-toggler.custom-toggler .hamburger::before {
    top: -8px;
}

.navbar-toggler.custom-toggler .hamburger::after {
    bottom: -8px;
}

.navbar-toggler.custom-toggler.collapsed .hamburger {
    transform: rotate(45deg);
}

.navbar-toggler.custom-toggler.collapsed .hamburger::before {
    top: 0;
    transform: rotate(-90deg);
}

.navbar-toggler.custom-toggler.collapsed .hamburger::after {
    bottom: 0;
    transform: rotate(-90deg);
}

/* Cart item layout improvements */
.product-result-card .card-body {
    min-height: 140px;
}

.product-result-card .product-image-thumbnail {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-result-card .product-info {
    min-width: 0;
}

.product-result-card .product-info .product-body {
    margin-bottom: 0.6rem;
}

.product-result-card .product-info .product-meta {
    color: var(--muted);
}

.product-result-card .product-description-text {
    color: #444;
    line-height: 1.3;
    max-height: 3.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-result-card .cart-item-actions {
    min-width: 120px;
}

/* Ensure spacing looks good on small screens (stacked layout) */
@media (max-width: 767.98px) {
    .product-result-card .card-body {
        min-height: auto;
    }

    .product-result-card .cart-item-actions {
        width: 100%;
    }
}

/* Mobile friendly spacing */
@media (max-width: 767.98px) {
    .navbar.glass {
        padding: .45rem 0.8rem;
    }

    .navbar .nav-controls {
        gap: .4rem;
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: .82rem;
    }
}

/* Tiny badges in dropdowns */
.dropdown-menu .badge {
    font-size: 0.62rem;
    padding: 0.18rem 0.32rem;
    border-radius: 0.35rem;
}

.dropdown-menu .dropdown-item .badge {
    vertical-align: middle;
}



/* Theme badge styling */
#currentThemeBadge {
    font-weight: 600;
    border-radius: 0.375rem;
    padding: 0.18rem 0.45rem;
}

@media (max-width: 576px) {
    #currentThemeBadge {
        display: none;
    }
}

/* Make logout link in the navbar fully white (text and icon) for legibility, with a subtle hover */
.navbar .nav-link.logout-link {
    color: #ffffff !important;
    /* ensure override against Bootstrap utilities */
    font-weight: 600;
    border-radius: 0.375rem;
    padding: 0.28rem 0.6rem;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

/* Ensure icon inside the logout link is also white */
.navbar .nav-link.logout-link i {
    color: #ffffff !important;
}

.navbar .nav-link.logout-link:hover,
.navbar .nav-link.logout-link:focus {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Inline filters next to Baker results header */
.baker-inline-filters {
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.baker-inline-filters .form-select {
    min-width: 110px;
    max-width: 220px;
}

.baker-inline-filters .input-group {
    margin-right: 0.25rem;
}

.baker-inline-filters .btn {
    white-space: nowrap;
}

.baker-inline-filters .compact-flavor {
    min-width: 90px;
    max-width: 160px;
}

/* Products page - compact inline filters: keep controls on a single line where possible */
.products-inline-filters {
    gap: 0.25rem;
    flex-wrap: nowrap;
    align-items: center;
}

.products-inline-filters .input-group {
    margin-right: 0.15rem;
}

.products-inline-filters .compact-style {
    min-width: 90px;
    max-width: 130px;
}

.products-inline-filters .compact-flavor {
    min-width: 90px;
    max-width: 130px;
}

.products-inline-filters .controls {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
}

.products-inline-filters .controls .btn {
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
}

.products-inline-filters .reset-icon {
    padding: 0.35rem;
    color: var(--bs-primary);
    font-size: 0.95rem;
}

.applied-filter-badges {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

@media (max-width: 576px) {

    /* Revert to stacked layout on small screens */
    .products-inline-filters {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .products-inline-filters .compact-style,
    .products-inline-filters .compact-flavor {
        width: 100%;
        min-width: unset;
    }

    .products-inline-filters .btn {
        width: 100%;
    }
}

.applied-filter-badges .badge {
    font-size: 0.82rem;
    padding: 0.28rem 0.48rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.applied-filter-badges .badge i {
    margin-right: 0.15rem;
}

.applied-filter-badges .badge a {
    text-decoration: none;
    color: inherit;
    opacity: 0.9;
    padding-left: 0.25rem;
}

/* Tighten breadcrumb spacing to reduce vertical gap between breadcrumb and main content */
.breadcrumb {
    margin-bottom: 0.25rem;
}

/* Results header: keep title and inline filters on the same line */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.results-header>.d-flex:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.results-header>.ms-3 {
    flex: 0 0 auto;
}

.results-header h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

@media (max-width: 768px) {
    .results-header h3 {
        white-space: normal;
    }

    .results-header {
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {

    /* Stack filters on small screens for better tap targets */
    .baker-inline-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }

    .baker-inline-filters .form-select {
        width: 100%;
        min-width: unset;
    }

    .baker-inline-filters .btn {
        width: 100%;
    }

    .applied-filter-badges {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 0.25rem;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.9;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.12);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: white;
}

a {
    color: var(--brand-primary);
    /* Brand primary */
}

a:hover {
    color: var(--primary-500);
    /* Lighter sage on hover */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: var(--brand-accent);
    color: white;
    border-color: rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    filter: brightness(0.95);
}

/* Ensure buttons update when --brand-accent changes (for older variants that used primary-gradient) */
.btn-hero-primary {
    background: var(--brand-accent);
    color: #111;
    border-color: rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--primary-shadow);
}

/* Hero (page header) */
.page-header {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header a.btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-primary);
}

/* Product / Baker card accents */
.product-card,
.baker-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid transparent;
}

/* use brand accent for card top border */
.product-card {
    border-top-color: var(--brand-accent);
}

.baker-card {
    border-top-color: var(--brand-accent);
}

/* Product image price overlay */
.product-image-thumbnail {
    position: relative;
    overflow: hidden;
}

.product-image-price {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 9999;
}

/* Brand badge (first character - filled) */
.brand-badge {
    display: inline-flex;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: var(--brand-accent, #667eea);
    color: var(--brand-accent-foreground, #fff);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0 3px;
}

.brand-text {
    font-size: 1rem;
    margin-left: -6px;
    color: var(--brand-accent-foreground, #fff);
}

@media (max-width: 576px) {
    .brand-badge {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
        padding: 0 2px;
    }

    .brand-text {
        font-size: 0.95rem;
        margin-left: -4px;
    }
}

.product-image-price.top-left {
    top: 8px;
    left: 8px;
}

.product-image-price.top-right {
    top: 8px;
    right: 8px;
}

.product-image-price.bottom-left {
    bottom: 8px;
    left: 8px;
}

.product-image-price.bottom-right {
    bottom: 8px;
    right: 8px;
}

@media (max-width: 576px) {
    .product-image-price {
        font-size: 0.85rem;
        padding: 0.25rem 0.4rem;
    }
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Auth Page */
.auth-page {
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--brand-primary);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--muted);
}

.test-accounts {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.test-accounts h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.test-accounts p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

/* Tweak required asterisk spacing and size for labels using .form-label */
.form-label .text-danger {
    margin-left: 0.25rem;
    font-size: 0.95em;
    vertical-align: middle;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(107, 142, 107, 0.08);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* Use Bootstrap's default alert color styles; avoid app-specific theme overrides for alerts */

/* Page Header */
.page-header {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Filters */
.filters-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px var(--shadow);
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
}

.search-input,
.filter-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* Cards */
.bakers-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.baker-card,
.product-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.baker-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.baker-card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.baker-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.baker-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.baker-info h3 {
    margin-bottom: 0.5rem;
}

.rating,
.rating-large {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.star {
    color: #ddd;
    font-size: 1.2rem;
}

.star.filled {
    color: #ffc107;
}

.rating-text {
    margin-left: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.location {
    color: var(--muted);
    font-size: 0.9rem;
}

.baker-bio {
    margin-bottom: 1rem;
    color: #555;
}

.baker-specialties {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #495057;
}

/* Availability badge for product cards */
.badge-availability {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    line-height: 1;
    /* keep compact */
}

.badge-success {
    background: var(--success);
    color: white;
}

.products-preview {
    margin-bottom: 1rem;
}

.product-mini {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.price {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Product Cards */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Single-line truncate helper for product titles */
.single-line-truncate {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Compact headings: reduce vertical spacing for page titles */
h2 {
    padding: 0.25rem 0;
    margin: 0.35rem 0 0.6rem;
}

/* Ensure prominent hero stays visually distinct but compact */
.hero-title {
    padding: 0.35rem 0;
    margin-bottom: 0.6rem;
}


.product-details h3 {
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--muted);
    margin-bottom: 1rem;
}

.product-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: #d4edda;
    color: #155724;
    border-radius: 20px;
    font-size: 0.85rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

/* Baker Profile */
.baker-profile-header {
    background: var(--primary-gradient);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.profile-top {
    display: flex;
    gap: 2rem;
    align-items: start;
}

.profile-info h1 {
    margin-bottom: 1rem;
}

.bio {
    margin: 1rem 0;
    opacity: 0.9;
}

.specialties {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.specialties .badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.contact-info {
    margin-top: 1rem;
}

.contact-info p {
    margin: 0.5rem 0;
}

.reviews-section {
    margin-top: 2rem;
}

.review-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Review count link in baker header */
.review-count-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent);
    font-weight: 600;
}

.review-count-link:hover {
    text-decoration: none;
    color: var(--accent);
    opacity: 0.9;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rating-small {
    display: flex;
    gap: 0.25rem;
}

.rating-small .star {
    font-size: 1rem;
}

.review-date {
    color: #999;
}

/* Product Details */
.product-detail-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-image-large {
    width: 100%;
    border-radius: 10px;
}

.product-price-large {
    font-size: 2rem;
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Prevent product name from awkward wrapping on details page */
.product-detail-page .product-info-section h1.product-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-description-full {
    margin-bottom: 1.5rem;
    color: #555;
}

.product-meta {
    background: var(--bg);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.product-meta p {
    margin: 0.5rem 0;
}

.add-to-cart-form .quantity-selector {
    margin-bottom: 1rem;
}

.quantity-selector input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Cart */
.cart-page {
    display: flex;
    flex-direction: column-reverse;
    /* show Order Summary before items */
    gap: 1.5rem;
}

.cart-item {
    background: var(--card-bg);
    padding: 1.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.25rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.cart-item-image {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h3 {
    margin-bottom: 0.5rem;
}

.cart-baker {
    color: var(--muted);
    font-size: 0.95rem;
}

.cart-price {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.15rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.quantity-form input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.item-total {
    font-weight: bold;
    color: var(--accent);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    text-decoration: underline;
}

.cart-summary {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 10px;
    height: fit-content;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    position: static;
    /* no longer sticky to fit top of page */
}

.order-summary-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Cart page specific tweaks */
.cart-items .product-image-thumbnail img {
    width: 160px !important;
    height: 160px !important;
    object-fit: cover !important;
}

.cart-page .product-result-card {
    padding: 1.25rem;
}

@media (min-width: 992px) {

    /* Slightly larger cards on larger screens */
    .cart-page .product-result-card {
        padding: 1.5rem;
    }
}


@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item .cart-item-image {
        width: 120px;
        height: 120px;
        margin-bottom: 0.75rem;
    }

    .cart-item-actions {
        align-items: flex-start;
        width: 100%;
        margin-top: 0.75rem;
    }

    .order-summary-card {
        margin-bottom: 1rem;
    }

    .pin-input {
        max-width: 90px;
    }
}

.cart-summary h2 {
    margin-bottom: 1rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.summary-line.total {
    border-top: 2px solid #333;
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

.checkout-actions {
    margin-top: 0.75rem;
}

.checkout-actions .btn {
    padding: 0.45rem 0.9rem;
    min-width: 110px;
}

.checkout-actions .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}


/* Orders */
.money {
    font-weight: 600;
}

.order-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.order-card:hover {
    transform: translateY(-3px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.order-header h3 {
    margin-bottom: 0.5rem;
}

.order-date {
    color: #999;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled,
.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.order-items-list {
    margin-bottom: 1rem;
}

.order-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}



.order-summary-small .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.order-summary-small .summary-row.total {
    border-top: 2px solid #333;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.order-meta {
    background: var(--bg);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.order-meta p {
    margin: 0.5rem 0;
}

.order-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.review-form {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
}

/* Order view specific styles (moved from Views/Orders/Index.cshtml) */
.highlight-order {
    box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.25);
    transition: box-shadow 0.3s ease;
}



/* product-result-row: used to style product rows inside orders */
.product-result-row {
    border: 1px solid #e9ecef;
    border-radius: .375rem;
    background: #ffffff;
}

/* Profile */
.profile-page {
    display: grid;
    gap: 2rem;
}

.profile-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-section h2 {
    margin-bottom: 1.5rem;
}

.profile-form .form-group {
    margin-bottom: 1.5rem;
}

.order-history-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.order-history-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.order-history-total {
    font-weight: bold;
    color: var(--accent);
    margin-top: 0.5rem;
}

.upload-section {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.upload-section input[type="file"] {
    margin-bottom: 0.5rem;
}

.payment-proof-uploaded {
    color: var(--success);
    font-weight: 600;
    margin-top: 0.5rem;
}

.profile-actions {
    margin-top: 2rem;
    text-align: center;
}

/* Baker Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px var(--shadow);
    text-align: center;
}

.stat-card.stat-orders {
    border-bottom: 3px solid #007bff;
}

.stat-card.stat-earnings {
    border-bottom: 3px solid #28a745;
}

.stat-card.stat-products {
    border-bottom: 3px solid #6f42c1;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-card.highlight {
    background: var(--primary-gradient);
    color: white;
}

.stat-card.highlight h3 {
    color: white;
}

.dashboard-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Admin */
.table-container {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--bg);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.admin-table tr:hover {
    background: var(--bg);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.detail-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.order-summary-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.order-summary-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.order-total {
    font-weight: bold;
    color: var(--accent);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.quick-link-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s;
}

.quick-link-card:hover {
    transform: translateY(-5px);
}

.quick-link-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.verification-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.verification-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.review-management-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.review-comment {
    background: var(--bg);
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.review-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.product-card-small {
    background: var(--bg);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design - Mobile, Tablet, Desktop */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 15px;
    }

    .bakers-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .filter-form {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (below 768px) */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    /* Navigation */
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    /* Filter and Grids */
    .filter-form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .bakers-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Product Detail */
    .product-detail-page {
        grid-template-columns: 1fr;
    }

    .product-image-large {
        max-height: 300px;
    }

    /* Cart */
    .cart-page {
        grid-template-columns: 1fr;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
    }

    .cart-item-image {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .cart-item-actions {
        width: 100%;
        justify-content: center;
    }

    /* Orders */
    .order-details {
        grid-template-columns: 1fr;
    }

    /* Profile */
    .profile-top {
        flex-direction: column;
        text-align: center;
    }

    .profile-page {
        grid-template-columns: 1fr;
    }

    /* Tabs */
    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    /* Add more spacing between dashboard tabs and content below on mobile */
    .dashboard-tabs {
        margin-bottom: 1.5rem;
        gap: 0.75rem;
    }

    /* Add spacing between filter buttons on mobile */
    .filter-buttons {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .filter-buttons .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    /* Buttons */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }

    /* Tables & Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    .baker-card,
    .product-card {
        margin-bottom: 1rem;
    }

    /* Auth Page */
    .auth-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    /* Baker Dashboard Mobile Stats - Modern Compact Row */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .stat-card {
        padding: 0.75rem 0.5rem !important;
        border-radius: 12px !important;
    }

    .stat-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .stat-card h3 i {
        font-size: 1rem;
        opacity: 0.8;
    }

    .stat-card p {
        font-size: 0.7rem !important;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--muted);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Baker Dashboard Container & Heading */
    .container h2 i.fa-tachometer-alt {
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }

    .container h2 {
        font-size: 1.4rem !important;
        margin-bottom: 1.25rem !important;
        display: flex;
        align-items: center;
    }
}

/* Small Mobile (below 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .container {
        padding: 8px;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .cart-summary,
    .order-history-card {
        padding: 1rem;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Theme-styled Bootstrap modal header/footer */
.theme-modal .modal-header {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
}

.theme-modal .modal-header .modal-title,
.theme-modal .modal-header h5,
.theme-modal .modal-header .modal-title i {
    color: white;
}

.theme-modal .modal-footer {
    background: var(--brand-primary);
    color: white;
    border-top: none;
}

.theme-modal .modal-footer .btn {
    border-radius: 6px;
}

/* Ensure modals that intentionally use .bg-transparent still receive theme header/footer */
.theme-modal .modal-content.bg-transparent .modal-header,
.theme-modal .modal-content.bg-transparent .modal-footer {
    /* Use primary gradient for headers and brand primary for footers to match regular theme */
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.theme-modal .modal-content.bg-transparent .modal-header .modal-title,
.theme-modal .modal-content.bg-transparent .modal-header h5 {
    color: white;
}

/* Make Bootstrap close button visible on dark header */
.btn-close.btn-close-white {
    filter: invert(1) grayscale(1) contrast(2);
}

/* Slight shadow for modal content to lift above page */
.theme-modal {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}


.product-card img {
    display: block;
    margin: 0 auto;
    /* centers image */
    max-width: 100%;
    height: auto;
}

/* Small circular action icon used for product actions (View, Delivery, Add-to-Cart) */
.action-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.action-icon i {
    line-height: 1;
}


.filter-form {
    justify-content: center;
    /* centers flex items */
    text-align: center;
    width: 100%;
}

.filters-section {
    display: flex;
    justify-content: center;
    /* centers whole form block */
}


.avatar-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    background: #f2f2f2;
    display: block;
    margin: auto;
}


.baker-card:hover {
    transform: translateY(-4px);
    transition: 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.baker-card:hover {
    transform: translateY(-4px);
    transition: 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.baker-card {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.avatar-wrap {
    display: flex;
    align-items: flex-start;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ff9800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.baker-info {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.baker-name {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: .3rem;
}

.baker-detail {
    margin: 0;
    color: #333;
}

.baker-detail i {
    margin-right: 6px;
    color: #ff6f00;
}

.baker-detail a {
    color: #444;
    text-decoration: none;
}

.baker-description {
    margin-top: .4rem;
    color: #555;
    font-size: 0.95rem;
}

.product-section {
    margin-top: 1.2rem;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.product-item {
    background: #f1f1f1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.share-section {
    margin-top: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #000;
}

.share-btn.copy {
    background: #6c757d;
}

.share-btn.native-share {
    background: var(--brand-primary);
}



/* PRODUCT GRID */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.4rem;
    margin-top: 1rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-content {
    padding: 1rem;
    flex-grow: 1;
}

.product-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-footer {
    margin-top: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag {
    background: #ffe8c6;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .75rem;
    margin-right: 6px;
}

/* Category Cards with Descriptions */
.categories-list {
    display: grid;
    /* Aim for 3 categories per row on wide screens, 2 on medium, 1 on narrow */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

@media (max-width: 992px) {
    .categories-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .categories-list {
        grid-template-columns: 1fr;
    }
}

.category-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0.6rem;
    /* reduced padding for tighter layout */
    transition: all 0.3s ease;
    cursor: default;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-500);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.category-icon {
    font-size: 1.5rem;
    color: var(--brand-primary);
    min-width: 24px;
}

.category-name {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.category-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
    padding-left: 2.25rem;
}

/* Dashboard Mobile Card Styles */
.order-card-mobile {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}

.order-card-mobile:active {
    transform: scale(0.98);
    background-color: #f9f9f9;
}

.quick-actions-mobile .btn {
    transition: transform 0.1s;
}

.quick-actions-mobile .btn:active {
    transform: translateY(2px);
}

.form-card-mobile {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.fw-500 {
    font-weight: 500;
}

.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}

/* Existing Mobile Media Query Polishing */
/* Responsive adjustments for categories */
@media (max-width: 768px) {
    .categories-list {
        grid-template-columns: 1fr;
    }
}

/* Amazon-style Breadcrumb */
.breadcrumb {
    background-color: transparent !important;
    /* reduced vertical padding and margin to tighten spacing site-wide */
    padding: 0.25rem 0 !important;
    margin-bottom: 0.25rem !important;
    font-size: 0.875rem !important;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: #555;
    font-size: 1.1rem;
    padding: 0 0.5rem;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
    margin-top: -2px;
}

.breadcrumb-item a {
    color: #007185 !important;
    text-decoration: none !important;
}

.breadcrumb-item a:hover {
    color: #C7511F !important;
    text-decoration: underline !important;
}

.breadcrumb-item.active {
    color: #565959 !important;
    font-weight: 500;
}

.breadcrumb-item .text-muted {
    color: #6c757d !important;
}

/* Baker Search Result Cards - Full Width */
.baker-result-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.baker-result-card:hover {
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.25);
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

.baker-result-card .baker-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.baker-result-card .card-title a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    transition: color 0.3s ease;
}

.baker-result-card .card-title a:hover {
    color: var(--brand-primary);
}

.baker-result-card .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.baker-description {
    font-size: 1rem;
    color: #2c3e50;
    line-height: 1.6;
    font-weight: 500;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1rem;
}

/* Lighter category badges */
.category-badge {
    background-color: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #c8e6c9;
    font-weight: 500;
}

/* Better button styling */
.baker-view-btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-width: 2px;
    transition: all 0.3s ease;
}

.baker-view-btn:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateX(3px);
}

/* Inline categories row for search results */
.categories-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.categories-row .category-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--muted-color, #6c757d);
}

.categories-row .category-item i {
    font-size: 0.95rem;
    color: var(--brand-primary);
}


.pagination .page-item.active .page-link {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.pagination .page-link {
    color: var(--brand-primary);
}

.pagination .page-link:hover {
    color: var(--brand-primary);
    background-color: #f8f9fa;
}

/* Product Result Cards */
.products-results-container {
    margin-top: 8px;
}

/* Baker Result Cards */
.baker-results-container {
    /* Remove the extra gap so the results align directly under the filter card (matches products behavior) */
    margin-top: 0;
    padding-top: 0;
}

/* Remove any unexpected spacing on the first result card */
.baker-results-container>.card:first-child {
    margin-top: 0 !important;
}

/* Make header spacing slightly tighter on baker search and ensure no extra top margin */
.results-header {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Align results header controls with top filter card inner padding */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 1.25rem;
    /* match .card-body default padding */
    padding-right: 1.25rem;
}

/* Apply matching horizontal padding to results container so cards line up with filters */
.baker-results-container,
.products-results-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Baker search wrapper: constrain width to match filter card content area */
.baker-search-wrapper {
    /* Match site container width to align with other pages */
    max-width: 1140px;
    /* same as .container */
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

/* When inside the constrained wrapper, remove extra left/right padding to align precisely */
.baker-search-wrapper .baker-results-container,
.baker-search-wrapper .results-header {
    padding-left: 0;
    padding-right: 0;
}

/* Normalize vertical gap between the filter card and the results header when placed one after the other */
.baker-search-wrapper {
    margin-bottom: .5rem;
}

/* Tighten spacing when search wrapper and results containers are directly adjacent */
.container:has(.baker-search-wrapper) {
    padding-bottom: 8px;
}

.container:has(.baker-search-wrapper)+.container {
    padding-top: 8px;
}

/* Fallback for browsers without :has support */
.container+.container .baker-results-container {
    margin-top: 0;
    padding-top: 0;
}

.container+.container .results-header {
    margin-top: 0;
}

/* Reduce default card bottom spacing when the filter card sits above the results so the gap matches products browse */
.baker-search-wrapper .card.mb-4 {
    margin-bottom: .5rem;
}

/* Hide any inline search/reset controls left accidentally in the results header */
.results-header .baker-inline-filters {
    display: none !important;
}

@media (max-width: 576px) {
    .results-header {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .baker-results-container,
    .products-results-container {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .baker-search-wrapper {
        padding-left: .5rem;
        padding-right: .5rem;
    }
}

/* Top nav spacing overrides (no separators) */
/* Keep any JS-inserted spans harmless */
.nav-sep {
    display: none !important;
}

@media (min-width: 992px) {

    /* No pipes: ensure link spacing is tightened but natural */
    .theme-navbar .nav-controls a.nav-link,
    .theme-navbar .nav-controls a.btn {
        margin-right: .45rem;
        margin-left: .12rem;
        padding: .28rem .6rem;
    }

    .theme-navbar .nav-controls .me-3 {
        margin-right: .45rem !important;
    }

    /* Prevent nav items from growing to fill available space */
    .theme-navbar .nav-controls a,
    .theme-navbar .navbar-nav>li>a {
        flex: 0 0 auto;
        display: inline-flex;
    }

    .theme-navbar .nav-controls a.btn {
        padding-top: .28rem;
        padding-bottom: .28rem;
    }
}

/* Keep link/button alignment consistent for vertical centering */
.nav-controls .nav-link,
.nav-controls .btn {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* Baker card visual tweaks */
.baker-results-container .card {
    border-color: #e9ecef;
    background: #ffffff;
    transition: transform .15s ease, box-shadow .15s ease;
}

.baker-results-container .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.baker-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.2rem;
    /* approximate height for two lines */
}

/* Delivery badge in footer */
.baker-results-container .delivery-badge .badge {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    display: inline-block;
}


/* Overlay text at bottom of product/baker thumbnail */
.product-image-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 25px 12px 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
    color: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 5;
    pointer-events: none;
}

.overlay-business-name {
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.baker-business-name {
    font-size: 1.15rem;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

/* Slightly reduce heading weight to avoid visual competition with the overlay */
.baker-results-container .product-title {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-result-card {
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.product-result-card:hover {
    box-shadow: 0 4px 12px rgba(107, 142, 107, 0.25) !important;
    border-color: var(--primary-500);
}

.product-icon {
    width: 60px;
    height: 60px;
    background: var(--brand-gradient, var(--primary-gradient));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.product-result-card .card-title a {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.product-result-card .card-title a:hover {
    color: var(--brand-primary);
}

.product-description-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.3rem;
    color: #2c3e50 !important;
    /* dark, always visible */
    position: relative;
    z-index: 2;
}

.dietary-badge {
    background-color: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #c8e6c9 !important;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-view-btn {
    white-space: nowrap;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.product-view-btn:hover {
    background-color: var(--brand-primary);
    color: white;
}

@media (max-width: 768px) {
    .baker-result-card .baker-avatar {
        width: 60px;
        height: 60px;
    }

    .baker-result-card .card-title {
        font-size: 1.1rem;
    }

    .baker-result-card .btn {
        width: 100%;
        margin-top: 1rem;
    }

    .baker-description {
        font-size: 0.9rem;
    }

    .product-result-card .product-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .product-result-card .card-title a {
        font-size: 1.1rem;
    }

    .product-view-btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Order Filter Styles */
.order-filter {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.order-filter .btn-group .btn {
    border-radius: 0.375rem !important;
    margin-right: 0.5rem;
    font-weight: 500;
}

.order-filter .btn-group .btn.active {
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-filter .btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .order-filter .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .order-filter .btn-group .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
}

/* Product Gallery Section */
.product-gallery-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
}

.product-gallery-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(107, 142, 107, 0.3) !important;
}

.product-gallery-card .card-img-top {
    transition: transform 0.3s ease;
}

.product-gallery-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-gallery-item:hover {
    text-decoration: none;
}

/* Responsive adjustments for product gallery */
@media (max-width: 576px) {
    .product-gallery-section .col-6 {
        padding: 0.25rem;
    }

    .product-gallery-card .card-img-top {
        height: 120px;
    }

    .product-gallery-card .card-body {
        padding: 0.5rem;
    }

    .product-gallery-card .card-text {
        font-size: 0.75rem !important;
    }
}

/* BuyerDemand styles */
.demand-card { border-radius: 10px; overflow: hidden; transition: box-shadow 0.2s ease, transform 0.15s ease; }
.demand-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.demand-desc { min-height: 72px; color: var(--muted); }
.demand-preview { background: var(--card-bg); border-radius: 8px; }
.demand-preview h5 { font-size: 1rem; margin-bottom: 0.5rem; }
.demand-preview .card-body { padding: 0.75rem; }
.position-sticky { position: sticky; top: 1rem; }
.list-group .list-group-item img { width: 48px; height: 48px; object-fit: cover; }
@media (max-width: 767px) {
    .demand-preview { margin-top: 1rem; }
    .demand-desc { min-height: auto; }
}