/* ============================================================
   AgriCatch UI Polish Layer
   Version: 1.0
   Purpose: Cross-system consistency, accessibility, micro-interactions
   Loaded AFTER all other CSS files to act as an enhancement layer
   ============================================================ */

/* ============================================================
   1. Accessibility — Focus Visible States
   ============================================================ */

:root {
    --polish-focus-ring: 0 0 0 3px rgba(74, 222, 128, 0.4);
    --polish-focus-ring-dark: 0 0 0 3px rgba(45, 122, 58, 0.35);
    --polish-transition-fast: 0.15s ease;
    --polish-transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --polish-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --polish-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
    --polish-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --polish-empty-icon: #d1d5db;
    --polish-empty-text: #6b7280;
    --polish-empty-bg: #fafafa;
    --polish-radius: 12px;
}

/* Visible focus ring for keyboard navigation only */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.filter-select:focus-visible,
.search-input:focus-visible,
.carousel-dot:focus-visible,
.page-btn:focus-visible,
.detail-panel-close:focus-visible,
.toggle-switch:focus-visible + .toggle-slider,
.ac-toggle-switch:focus-visible + .ac-toggle-slider {
    outline: none;
    box-shadow: var(--polish-focus-ring);
    border-radius: var(--polish-radius);
}

/* Admin/dark-theme focus ring */
.admin-theme a:focus-visible,
.admin-theme button:focus-visible,
.admin-theme .btn:focus-visible,
.admin-theme .form-control:focus-visible,
.admin-theme .form-select:focus-visible,
.admin-theme .page-btn:focus-visible,
.admin-theme .detail-panel-close:focus-visible,
.admin-theme .admin-tab:focus-visible {
    box-shadow: var(--polish-focus-ring-dark);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Screen-reader-only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   2. Empty State Component — Standardized
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--polish-empty-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 200px;
}

.empty-state i,
.empty-state .empty-state-icon {
    font-size: 3rem;
    color: var(--polish-empty-icon);
    margin-bottom: 0.5rem;
    display: block;
}

.empty-state p,
.empty-state .empty-state-text {
    margin: 0;
    font-size: 1rem;
    color: var(--polish-empty-text);
    max-width: 400px;
}

.empty-state .empty-state-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.empty-state .empty-state-description {
    font-size: 0.9rem;
    color: var(--polish-empty-text);
    margin: 0;
}

.empty-state .btn,
.empty-state a.btn {
    margin-top: 0.5rem;
}

/* Admin-panel variant */
.panel-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 200px;
    color: var(--ac-text-subtle, #9ca3af);
}

.panel-empty-state i {
    font-size: 2.5rem;
    opacity: 0.4;
}

.panel-empty-state p {
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================================
   3. Button Polish — Disabled, Active, Loading States
   ============================================================ */

/* Standard disabled state */
.btn:disabled,
.btn.disabled,
button:disabled,
button.disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* Active/pressed state for tactile feedback */
.btn:active:not(:disabled),
button:active:not(:disabled) {
    transform: scale(0.97);
}

/* Loading state */
.btn.is-loading,
button.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after,
button.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: polish-spin 0.6s linear infinite;
}

@keyframes polish-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   4. Card Micro-interactions
   ============================================================ */

/* Product card hover enhancement (customer-facing) */
.product-card:hover {
    box-shadow: var(--polish-shadow-lg);
}

/* Admin card hover */
.admin-section-card .card,
.admin-section-card .ac-card {
    transition: box-shadow var(--polish-transition-normal), transform var(--polish-transition-normal);
}

.admin-section-card .card:hover,
.admin-section-card .ac-card:hover {
    box-shadow: var(--polish-shadow-md);
}

/* Stat card hover */
.stat-card,
.ac-stat-card {
    transition: transform var(--polish-transition-fast), box-shadow var(--polish-transition-fast);
}

.stat-card:hover,
.ac-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--polish-shadow-md);
}

/* ============================================================
   5. Table Responsive Overflow
   ============================================================ */

/* Wrap tables for horizontal scroll on small screens */
.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--polish-radius);
}

.table-responsive-wrapper table {
    min-width: 600px;
}

/* Sticky header for scrollable tables */
.table-responsive-wrapper thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
}

/* Admin table sticky header */
.admin-theme .table-responsive-wrapper thead th {
    background: var(--ac-surface-alt, #f8fafc);
}

/* ============================================================
   6. Toast Polish
   ============================================================ */

/* Toast container — ensure it doesn't block clicks */
#toast-container {
    pointer-events: none;
}

#toast-container > * {
    pointer-events: auto;
}

/* Toast entrance/exit animations */
@keyframes polish-toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes polish-toast-out {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
}

.toast {
    animation: polish-toast-in 0.3s ease-out;
}

.toast.toast-centered {
    animation: toastInCenter 0.18s ease;
}

/* Admin toast styling */
.admin-toast {
    animation: polish-toast-in 0.3s ease-out;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--polish-shadow-md);
}

/* ============================================================
   7. Modal Polish — Smoother Animations
   ============================================================ */

/* Fade-in backdrop */
@keyframes polish-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scale-in dialog */
@keyframes polish-scale-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Product details modal */
.product-details-modal.active {
    animation: polish-fade-in 0.2s ease;
}

.product-details-modal .product-details-content {
    animation: polish-scale-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bootstrap modal enhancement */
.modal.show .modal-dialog {
    animation: polish-scale-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Auth modal logo white shadow */
.auth-modal-logo {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

/* Password requirements checklist */
.password-requirements {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    font-size: 0.5rem;
    color: #d1d5db;
    transition: color var(--polish-transition-fast);
}

.requirement-item.valid .requirement-icon {
    color: var(--uni-success, #059669);
}

.requirement-item.valid {
    color: var(--uni-success, #059669);
}

/* ============================================================
   8. Image Loading — Fade-in
   ============================================================ */

img {
    transition: opacity 0.3s ease;
}

img.is-loading {
    opacity: 0;
}

img.is-loaded {
    opacity: 1;
}

/* Product image placeholder */
.product-image {
    background: linear-gradient(135deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 200%;
    animation: polish-shimmer 1.5s infinite;
}

@keyframes polish-shimmer {
    0% { background-position: 200% 200%; }
    100% { background-position: -200% -200%; }
}

.product-image[src],
.product-image:not([src=""]) {
    animation: none;
    background: var(--light-gray, #f3f4f6);
}

/* ============================================================
   9. Scrollbar Styling
   ============================================================ */

/* Webkit scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Admin theme scrollbar */
.admin-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* ============================================================
   10. Link & Interaction Polish
   ============================================================ */

/* Smooth color transition on links */
a {
    transition: color var(--polish-transition-fast);
}

/* Smooth background transition on nav items */
.nav-link,
.header-nav a,
.sidebar-nav a,
.admin-tab {
    transition: color var(--polish-transition-fast), background var(--polish-transition-fast), border-color var(--polish-transition-fast);
}

/* ============================================================
   11. Form Input Polish
   ============================================================ */

/* Consistent placeholder color */
input::placeholder,
textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Select arrow consistency */
select {
    cursor: pointer;
}

/* Checkbox/radio focus */
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    box-shadow: var(--polish-focus-ring);
}

/* ============================================================
   12. Badge Polish
   ============================================================ */

.status-pill,
.badge-role-super_admin,
.badge-role-admin,
.badge-role-farmer,
.badge-role-customer,
.badge-active,
.badge-disabled,
.badge-verified,
.badge-unverified,
.badge-low-stock,
.badge-out-stock {
    transition: transform var(--polish-transition-fast);
}

.status-pill:hover,
.badge-role-super_admin:hover,
.badge-role-admin:hover,
.badge-role-farmer:hover,
.badge-role-customer:hover {
    transform: scale(1.05);
}

/* ============================================================
   13. 404 Page Polish
   ============================================================ */

.error-404 {
    text-align: center;
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-404 .error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary-color, #4ade80);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404 .error-message {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 2rem;
}

/* ============================================================
   14. Print Styles
   ============================================================ */

@media print {
    .sidebar,
    .header,
    .footer,
    .btn,
    .toast,
    #toast-container,
    .admin-chat-drawer,
    .admin-detail-panel,
    .carousel-dots,
    .featured-carousel-wrapper .carousel-nav {
        display: none !important;
    }

    .main {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* ============================================================
   15. Unified Design Tokens — Cross-System Bridge
   ============================================================ */

:root {
    /* Shared semantic colors that work across both design systems */
    --uni-primary: #2d7a3a;
    --uni-primary-dark: #1e5429;
    --uni-primary-light: #e8f5e9;
    --uni-primary-bright: #4ade80;
    --uni-secondary: #0ea5e9;
    --uni-danger: #dc2626;
    --uni-danger-light: #fef2f2;
    --uni-warning: #d97706;
    --uni-warning-light: #fffbeb;
    --uni-success: #059669;
    --uni-success-light: #ecfdf5;
    --uni-info: #2563eb;
    --uni-info-light: #eff6ff;

    /* Shared spacing */
    --uni-radius-sm: 6px;
    --uni-radius: 8px;
    --uni-radius-lg: 12px;
    --uni-radius-pill: 999px;

    /* Shared shadows */
    --uni-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --uni-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --uni-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
    --uni-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Shared transitions */
    --uni-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shared button metrics */
    --uni-btn-height: 38px;
    --uni-btn-height-sm: 30px;
    --uni-btn-height-lg: 48px;
    --uni-btn-radius: 8px;
    --uni-btn-font-size: 0.875rem;
    --uni-btn-font-weight: 500;

    /* Shared input metrics */
    --uni-input-height: 38px;
    --uni-input-radius: 8px;
    --uni-input-border: #d1d5db;
    --uni-input-border-focus: var(--uni-primary);
    --uni-input-placeholder: #9ca3af;
}

/* ============================================================
   15.1 Admin/Farmer Theme Body Fallback
   ============================================================ */

body.admin-theme {
    background: var(--uni-primary-light, #f5f7f5);
    color: #1a2e1e;
    margin: 0;
    padding: 0;
}

body.admin-theme .header {
    display: none;
}

body.admin-theme .footer {
    display: none;
}

body.admin-theme .container {
    max-width: 100%;
    padding: 0;
}

body.farmer-theme .admin-welcome-banner .welcome-title i,
body.farmer-theme .sidebar-logo {
    animation: none !important;
    transform: none !important;
}

/* ============================================================
   16. Typography Consistency
   ============================================================ */

/* Ensure all headings use the same font family across systems */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Consistent heading sizes */
.pagetitle h1,
.page-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.section-header h2,
.section-header h3,
.admin-section-card h2,
.admin-section-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

/* Consistent body font fallback */
body {
    font-family: 'Inter', 'Nunito', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================================
   17. Button Consistency
   ============================================================ */

/* Standardize .btn base across both systems */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: var(--uni-btn-height);
    padding: 0.5rem 1rem;
    border-radius: var(--uni-btn-radius);
    font-size: var(--uni-btn-font-size);
    font-weight: var(--uni-btn-font-weight);
    line-height: 1.4;
    transition: background var(--uni-transition), border-color var(--uni-transition),
                color var(--uni-transition), box-shadow var(--uni-transition),
                transform var(--uni-transition);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    vertical-align: middle;
}

/* Consistent hover transform for all buttons */
.btn:not(:disabled):not(.disabled):hover,
button:not(:disabled):not(.disabled):hover {
    transform: translateY(-1px);
}

/* Small button variant — unified */
.btn-small,
.btn-sm {
    min-height: var(--uni-btn-height-sm);
    padding: 0.25rem 0.625rem;
    font-size: 0.76rem;
    border-radius: var(--uni-radius-sm);
}

/* Large button variant — unified */
.btn-large,
.btn-lg {
    min-height: var(--uni-btn-height-lg);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--uni-radius-lg);
}

/* Primary button — unified green across systems */
.btn-primary {
    background-color: var(--uni-primary);
    border-color: var(--uni-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--uni-primary-dark) !important;
    border-color: var(--uni-primary-dark) !important;
    color: #fff;
}

/* Header login/register buttons stay transparent on hover */
.header-actions .user-menu {
    margin-left: -4rem !important;
}

.header-actions .user-menu #login-btn {
    margin-left: -3rem !important;
}

.header-actions .user-menu .btn-primary,
.header-actions .user-menu .btn-primary:hover,
.header-actions .user-menu .btn-primary:focus {
    background: transparent !important;
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    color: var(--white, #fff) !important;
    padding: 0.6rem 2rem !important;
    min-width: 120px !important;
}

.header-actions .user-menu .btn-primary:hover,
.header-actions .user-menu .btn-primary:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
}

/* Secondary button — unified */
.btn-secondary {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Outline button — unified */
.btn-outline,
.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--uni-primary);
    color: var(--uni-primary);
}

.btn-outline:hover,
.btn-outline-primary:hover {
    background: var(--uni-primary);
    color: #fff;
}

/* Ghost primary (admin) */
.btn-ghost-primary,
.ac-btn-outline-muted {
    background: transparent;
    border: 1px solid var(--uni-primary);
    color: var(--uni-primary);
    border-radius: var(--uni-radius);
}

.btn-ghost-primary:hover,
.ac-btn-outline-muted:hover {
    background: var(--uni-primary-light);
    color: var(--uni-primary-dark);
}

/* Ghost danger */
.btn-ghost-danger {
    background: transparent;
    border: 1px solid var(--uni-danger);
    color: var(--uni-danger);
    border-radius: var(--uni-radius);
}

.btn-ghost-danger:hover {
    background: var(--uni-danger-light);
}

/* Danger button */
.btn-danger,
.btn-ac-red,
.ac-btn-danger {
    background-color: var(--uni-danger);
    border-color: var(--uni-danger);
    color: #fff;
}

.btn-danger:hover,
.btn-ac-red:hover,
.ac-btn-danger:hover {
    background-color: #b91c1c;
    color: #fff;
}

/* Full-width button */
.btn-full,
.btn-block {
    width: 100%;
}

/* ============================================================
   18. Form Input Consistency
   ============================================================ */

/* Standardize input/select/textarea base */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
select,
textarea {
    min-height: var(--uni-input-height);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--uni-input-border);
    border-radius: var(--uni-input-radius);
    font-size: 0.875rem;
    color: #1f2937;
    background: #fff;
    transition: border-color var(--uni-transition), box-shadow var(--uni-transition);
    width: 100%;
}

/* Bootstrap form-control alignment */
.form-control,
.form-select {
    min-height: var(--uni-input-height);
    border-radius: var(--uni-input-radius);
    border: 1px solid var(--uni-input-border);
    font-size: 0.875rem;
}

/* Consistent focus state */
input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--uni-input-border-focus);
    box-shadow: 0 0 0 3px rgba(45, 122, 58, 0.12);
}

/* Consistent label */
.form-label,
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: #374151;
}

/* Consistent form group spacing */
.form-group {
    margin-bottom: 1rem;
}

/* Validation styles — unified */
input.invalid,
textarea.invalid,
input.input-error,
textarea.input-error {
    border-color: var(--uni-danger) !important;
    background-color: #fef2f2;
}

input.invalid:focus,
textarea.invalid:focus,
input.input-error:focus,
textarea.input-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

input.valid:not([type="password"]),
textarea.valid {
    border-color: var(--uni-success);
}

/* ============================================================
   19. Card Consistency
   ============================================================ */

/* Unify card radius and shadow across systems */
.card,
.admin-section-card,
.ac-card,
.stat-card,
.ac-stat-card,
.admin-chart-card {
    border-radius: var(--uni-radius-lg);
    box-shadow: var(--uni-shadow-xs);
    border: 1px solid #e5e7eb;
}

/* Consistent card hover */
.card:hover,
.admin-section-card:hover,
.ac-card:hover {
    box-shadow: var(--uni-shadow-sm);
}

/* Product card hover — unified */
.product-card {
    border-radius: var(--uni-radius-lg);
    box-shadow: var(--uni-shadow-sm);
    transition: transform var(--uni-transition), box-shadow var(--uni-transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--uni-shadow-lg);
}

/* Stat card hover — unified */
.stat-card:hover,
.ac-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--uni-shadow-md);
}

/* ============================================================
   20. Badge Consistency
   ============================================================ */

/* Unified badge base */
.badge,
.status-pill,
.badge-pending,
.badge-confirmed,
.badge-preparing,
.badge-ready,
.badge-delivered,
.badge-cancelled,
.badge-active,
.badge-disabled,
.badge-verified,
.badge-unverified,
.badge-low-stock,
.badge-out-stock,
.badge-role-super_admin,
.badge-role-admin,
.badge-role-farmer,
.badge-role-customer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--uni-radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

/* Status colors — unified */
.badge-active,
.badge-verified,
.badge-role-farmer {
    background: var(--uni-success-light);
    color: #065f46;
}

.badge-disabled,
.badge-cancelled,
.badge-out-stock {
    background: var(--uni-danger-light);
    color: #991b1b;
}

.badge-pending,
.badge-unverified,
.badge-low-stock {
    background: var(--uni-warning-light);
    color: #92400e;
}

.badge-confirmed,
.badge-role-admin {
    background: var(--uni-info-light);
    color: #075985;
}

.badge-preparing {
    background: #f5f3ff;
    color: #6d28d9;
}

.badge-ready,
.badge-delivered {
    background: var(--uni-success-light);
    color: var(--uni-primary);
}

.badge-role-super_admin {
    background: #fef3c7;
    color: #92400e;
}

.badge-role-customer {
    background: #f3f4f6;
    color: #374151;
}

/* ============================================================
   21. Table Consistency
   ============================================================ */

/* Unified table header */
.table thead th,
.admin-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.625rem 0.75rem;
}

/* Unified table cell */
.table td,
.admin-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Unified table hover */
.table tbody tr:hover td,
.admin-table tbody tr:hover td {
    background: #f9fafb;
}

/* ============================================================
   22. Modal Consistency
   ============================================================ */

/* Unified modal animation */
.modal.show .modal-dialog,
.admin-modal-backdrop.open .admin-modal {
    animation: polish-scale-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Unified modal header */
.modal-header,
.admin-modal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eef2ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Unified modal body */
.modal-body,
.admin-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* Unified modal footer */
.modal-footer,
.admin-modal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eef2ef;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Unified close button */
.modal .btn-close,
.admin-modal .modal-close,
.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--uni-radius);
    background: transparent;
    color: #6b7280;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--uni-transition), color var(--uni-transition);
}

.modal .btn-close:hover,
.admin-modal .modal-close:hover,
.close-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* ============================================================
   23. Toast Consistency
   ============================================================ */

/* Unified toast base */
.toast,
.admin-toast {
    border-radius: var(--uni-radius);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--uni-shadow-md);
    animation: polish-toast-in 0.3s ease-out;
}

/* Unified toast variants */
.toast-success,
.admin-toast.toast-success {
    background: var(--uni-success);
    color: #fff;
}

.toast-error,
.admin-toast.toast-error {
    background: var(--uni-danger);
    color: #fff;
}

.toast-info,
.admin-toast.toast-info {
    background: var(--uni-info);
    color: #fff;
}

/* Warning toast — add missing variant */
.toast-warning,
.admin-toast.toast-warning {
    background: var(--uni-warning);
    color: #fff;
}

/* ============================================================
   24. Loading State Consistency
   ============================================================ */

/* Unified inline loading spinner */
.loading-spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: polish-spin 0.6s linear infinite;
}

/* Section loading — unified */
.section-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 200px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.section-loading::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--uni-primary);
    border-radius: 50%;
    animation: polish-spin 0.8s linear infinite;
}

.section-loading-text {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ============================================================
   25. Responsive Fixes
   ============================================================ */

/* Prevent text overflow on small screens */
@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }

    .page-title,
    .pagetitle h1 {
        font-size: 1.1rem;
    }

    .section-header h2,
    .admin-section-card h2 {
        font-size: 1rem;
    }

    /* Prevent button text clipping */
    .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Ensure form inputs don't overflow */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Stack modal footer buttons on mobile */
    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

/* Ensure tables scroll on small screens */
.table-responsive,
.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   26. Accessibility Enhancements
   ============================================================ */

/* Ensure all interactive elements have visible focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 122, 58, 0.3);
}

/* Ensure links have discernible text */
a:not([aria-label]):not([aria-labelledby]):empty {
    visibility: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }

    .badge {
        border: 1px solid currentColor;
    }
}

/* ============================================================
   27. Icon Consistency
   ============================================================ */

/* Ensure icons in buttons are properly aligned */
.btn i,
.btn-small i,
.btn-ghost-primary i,
.btn-ghost-danger i,
.ac-btn-primary i,
.ac-btn-outline-muted i {
    font-size: 0.85em;
    line-height: 1;
    flex-shrink: 0;
}

/* Ensure icons in badges are consistent */
.badge i,
.status-pill i {
    font-size: 0.7rem;
    line-height: 1;
}

/* ============================================================
   28. Customer Landing Page Foundation
   ============================================================ */

/* Hero */
#home.hero {
    min-height: 100vh;
    padding: 120px 0 5rem;
    margin-top: -120px;
    box-shadow: none;
}

#home.hero .hero-overlay {
    background:
        radial-gradient(circle at 18% 30%, rgba(34, 197, 94, 0.18), transparent 34%),
        linear-gradient(90deg, rgba(6, 34, 22, 0.78), rgba(10, 47, 35, 0.46) 48%, rgba(8, 33, 45, 0.62)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.48));
}

#home.hero .hero-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1rem;
}

#home.hero .hero-content h2 {
    font-size: 3.15rem;
    line-height: 1.08;
    font-weight: 800;
    margin-bottom: 1.05rem;
    letter-spacing: 0;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.36);
}

#home.hero .hero-content p {
    max-width: 610px;
    margin: 0 auto 2.15rem;
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

#home.hero .hero-buttons {
    gap: 0.9rem;
    justify-content: center;
}

#home.hero .hero-buttons .btn {
    min-height: 50px;
    min-width: 210px;
    padding: 0.8rem 1.35rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 800;
}

#home.hero .hero-buttons .btn-hero-primary {
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 30px rgba(74, 222, 128, 0.34);
}

#home.hero .hero-buttons .btn-hero-outline {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.68);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
}

#home.hero .hero-buttons .btn-hero-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

#home.hero .hero-buttons .btn-hero-outline:hover {
    transform: translateY(-2px);
}

/* Section rhythm and headings */
#featured,
#available-now,
#preorder,
#about,
#contact {
    padding: 4.75rem 0;
    box-shadow: none;
}

#featured.featured-section {
    padding-top: 4.4rem;
    padding-bottom: 4.8rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
}

#available-now {
    background: #ffffff;
    padding-top: 3.8rem;
    padding-bottom: 4.7rem;
}

#preorder {
    background: linear-gradient(180deg, #fff7ed 0%, #fffaf4 100%);
    border-top: 1px solid rgba(245, 158, 11, 0.24);
}

#featured .products-header,
#available-now .products-header,
#preorder .products-header {
    margin-bottom: 2rem;
    gap: 0.7rem;
}

#featured .products-header .section-title,
#available-now .products-header .section-title,
#preorder .products-header .section-title,
#marketplace-filter .marketplace-filter-title,
#contact .contact-title,
#about .about-text h2 {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0.65rem;
    color: #17251b;
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

#featured .products-header .section-title::after,
#available-now .products-header .section-title::after,
#preorder .products-header .section-title::after,
#contact .contact-title::after {
    display: none;
}

#marketplace-filter .marketplace-filter-subtitle,
#preorder .preorder-subtitle,
#about .about-text p,
#contact .contact-message {
    color: #5d6b62;
    line-height: 1.7;
}

/* Marketplace filter */
#marketplace-filter.marketplace-filter-section {
    background: linear-gradient(180deg, #f8fbf9 0%, #eef7f1 100%);
    border-top: 1px solid #e4eee7;
    border-bottom: 1px solid #dfece5;
    padding: 3.25rem 0;
}

#marketplace-filter .marketplace-filter-header {
    margin-bottom: 1.65rem;
}

#marketplace-filter .marketplace-filter-bar {
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(213, 226, 217, 0.92);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(28, 72, 44, 0.08);
}

#marketplace-filter .mf-search-wrap {
    flex-basis: 270px;
}

#marketplace-filter .mf-search-input,
#marketplace-filter .mf-sort-select {
    min-height: 44px;
    border-color: #d7e3dc;
    background: #ffffff;
    border-radius: 10px;
}

#marketplace-filter .mf-categories-wrap {
    gap: 0.5rem;
}

#marketplace-filter #global-category-tabs .btn {
    min-height: 38px;
    padding: 0.48rem 0.85rem;
    border-radius: 999px;
    border-color: transparent;
    background: #eef3ef;
    color: #293c31;
    font-weight: 700;
}

#marketplace-filter #global-category-tabs .btn.active {
    background: #139a4f;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(19, 154, 79, 0.2);
}

/* Product layout foundation */
:where(#featured, #available-now, #preorder) .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.35rem;
    align-items: stretch;
    margin-bottom: 0;
}

:where(#featured, #available-now, #preorder) .product-card {
    border-color: #e6eee8;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(26, 53, 34, 0.07);
}

:where(#featured, #available-now, #preorder) .product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 197, 94, 0.42);
    box-shadow: 0 18px 34px rgba(26, 53, 34, 0.12);
}

:where(#featured, #available-now, #preorder) .product-card::before {
    display: none;
}

:where(#featured, #available-now, #preorder) .product-image {
    display: block;
    height: 190px;
    object-fit: cover;
}

:where(#featured, #available-now, #preorder) .product-info {
    padding: 1rem;
}

:where(#featured, #available-now, #preorder) .product-card .badge {
    border-radius: 999px;
    padding: 0.24rem 0.58rem;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

:where(#featured, #available-now, #preorder) .product-card .badge.bg-success {
    background: #119c50 !important;
    color: #ffffff;
}

:where(#featured, #available-now, #preorder) .product-card .harvest-soon-badge {
    background: #f97316;
    color: #ffffff;
}

:where(#featured, #available-now, #preorder) .product-name {
    color: #17251b;
    font-weight: 800;
}

:where(#featured, #available-now, #preorder) .product-price {
    color: #07833e;
    font-weight: 800;
}

#featured .featured-carousel-wrapper {
    margin: 0 auto;
}

#featured .featured-slide {
    padding: 0 0.85rem;
}

#featured .carousel-dots {
    margin-top: 1.35rem;
}

/* About and contact */
#about.about {
    background: #ffffff;
}

#about .about-content,
#contact .contact-content {
    gap: 3.5rem;
}

#about .about-features {
    margin-top: 1.5rem;
}

#about .about-features li {
    margin-bottom: 0.8rem;
    color: #293c31;
    font-weight: 600;
}

#about .about-features i,
#contact .contact-item i {
    color: #139a4f;
}

#about .about-image img {
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(26, 53, 34, 0.13);
}

#contact.contact {
    background: #f7faf8;
    border-top: 1px solid #e7efe9;
}

#contact .contact-info,
#contact .contact-form {
    background: #ffffff;
    border: 1px solid #e4eee7;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(26, 53, 34, 0.07);
}

#contact .contact-info,
#contact .contact-form {
    padding: 1.5rem;
}

@media (max-width: 991px) {
    #home.hero {
        min-height: 560px;
        height: auto;
        padding: 6rem 0 4.5rem;
    }

    #home.hero .hero-content h2 {
        font-size: 2.25rem;
    }

    #home.hero .hero-content p {
        font-size: 1rem;
    }

    #marketplace-filter .marketplace-filter-bar {
        align-items: stretch;
    }

    #marketplace-filter .mf-search-wrap {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    #featured,
    #available-now,
    #preorder,
    #about,
    #contact,
    #marketplace-filter.marketplace-filter-section {
        padding: 3.25rem 0;
    }

    #featured .products-header .section-title,
    #available-now .products-header .section-title,
    #preorder .products-header .section-title,
    #marketplace-filter .marketplace-filter-title,
    #contact .contact-title,
    #about .about-text h2 {
        font-size: 1.45rem;
    }

    #home.hero .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    #home.hero .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    #marketplace-filter .marketplace-filter-bar {
        padding: 0.85rem;
        border-radius: 12px;
    }

    #marketplace-filter .mf-categories-wrap {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.15rem;
    }

    #marketplace-filter #global-category-tabs .btn {
        flex: 0 0 auto;
    }

    #marketplace-filter .mf-sort-wrap {
        width: 100%;
    }

    #marketplace-filter .mf-sort-select {
        flex: 1;
    }

    #about .about-content,
    #contact .contact-content {
        gap: 1.75rem;
    }
}

@media (max-width: 576px) {
    #home.hero {
        min-height: 500px;
        padding: 5.25rem 0 3.5rem;
    }

    #home.hero .hero-content h2 {
        font-size: 1.7rem;
    }

    #home.hero .hero-content p {
        font-size: 0.92rem;
        line-height: 1.6;
        margin-bottom: 1.6rem;
    }

    :where(#featured, #available-now, #preorder) .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    :where(#featured, #available-now, #preorder) .product-image {
        height: 132px;
    }

    :where(#featured, #available-now, #preorder) .product-info {
        padding: 0.72rem;
    }

    #contact .contact-info,
    #contact .contact-form {
        padding: 1.1rem;
        border-radius: 12px;
    }
}

/* ============================================================
   29. Customer Product Card Modernization
   ============================================================ */

:where(#featured, #available-now, #preorder) .product-card {
    overflow: hidden;
    border: 1px solid rgba(213, 226, 217, 0.96);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(23, 37, 27, 0.07);
    transition:
        transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

:where(#featured, #available-now, #preorder) .product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(19, 154, 79, 0.36);
    box-shadow: 0 18px 38px rgba(23, 37, 27, 0.12);
}

:where(#featured, #available-now, #preorder) .product-card::before {
    display: none;
}

:where(#featured, #available-now, #preorder) .product-card > .product-image {
    height: 205px;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0;
    background: #eef3ef;
    transition: transform 0.28s ease, filter 0.28s ease;
}

:where(#featured, #available-now, #preorder) .product-card:hover > .product-image {
    transform: scale(1.025);
    filter: saturate(1.04) contrast(1.02);
}

:where(#featured, #available-now, #preorder) .product-info {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 0.42rem;
    padding: 1rem 1.05rem 1.1rem;
    min-height: 0;
}

:where(#featured, #available-now, #preorder) .product-card .badge {
    align-self: flex-start;
    min-height: 22px;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 7px 14px rgba(23, 37, 27, 0.12);
}

:where(#featured, #available-now, #preorder) .product-card .badge.bg-success {
    background: linear-gradient(135deg, #16a34a, #0f8f45) !important;
    color: #ffffff;
}

:where(#featured, #available-now, #preorder) .product-card .harvest-soon-badge {
    background: linear-gradient(135deg, #fb923c, #f97316) !important;
    color: #ffffff;
}

:where(#featured, #available-now, #preorder) .product-name {
    margin: 0.05rem 0 0;
    color: #15251a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

:where(#featured, #available-now, #preorder) .product-price {
    margin: 0;
    color: #07833e;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.25;
}

:where(#featured, #available-now, #preorder) .product-farmer,
:where(#featured, #available-now, #preorder) .product-stock,
:where(#featured, #available-now, #preorder) .product-details,
:where(#featured, #available-now, #preorder) .product-rating-wrap,
:where(#featured, #available-now, #preorder) .product-stats-lines,
:where(#featured, #available-now, #preorder) .product-card-summary {
    color: #596a60;
    font-size: 0.82rem;
    line-height: 1.35;
}

:where(#featured, #available-now, #preorder) .product-card-summary {
    gap: 0.36rem;
    margin-top: 0.1rem;
}


:where(#featured, #available-now, #preorder) .wishlist-toggle-btn {
    position: absolute !important;
    top: 12px;
    right: 12px;
    z-index: 4;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0 !important;
    border: 1px solid rgba(226, 232, 240, 0.92) !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.96) !important;
    color: #9ca3af;
    box-shadow: 0 9px 20px rgba(15, 23, 42, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

:where(#featured, #available-now, #preorder) .wishlist-toggle-btn:hover {
    transform: translateY(-1px) scale(1.05);
    background: #ffffff !important;
    border-color: rgba(248, 113, 113, 0.42) !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

:where(#featured, #available-now, #preorder) .wishlist-toggle-btn i {
    font-size: 1rem !important;
    line-height: 1;
    pointer-events: none;
}

#featured .featured-card .product-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


@media (max-width: 576px) {
    :where(#featured, #available-now, #preorder) .product-card {
        border-radius: 13px;
    }

    :where(#featured, #available-now, #preorder) .product-card > .product-image {
        height: 142px;
    }

    :where(#featured, #available-now, #preorder) .product-info {
        gap: 0.32rem;
        padding: 0.78rem;
    }

    :where(#featured, #available-now, #preorder) .product-card .badge {
        min-height: 20px;
        padding: 0.24rem 0.52rem;
        font-size: 0.58rem;
    }

    :where(#featured, #available-now, #preorder) .product-name {
        font-size: 0.9rem;
    }

    :where(#featured, #available-now, #preorder) .product-price {
        font-size: 0.98rem;
    }

    :where(#featured, #available-now, #preorder) .wishlist-toggle-btn {
        top: 9px;
        right: 9px;
        width: 34px;
        height: 34px;
        min-height: 34px;
    }
}
/* ============================================================
   30. Landing Page Task 3 Refinements
   ============================================================ */

#home.hero {
    margin-top: 0;
    min-height: calc(100vh - 120px);
}

#home.hero .hero-video-wrapper,
#home.hero .hero-video-fallback,
#home.hero .hero-video-placeholder,
#home.hero .hero-video {
    top: 0;
    height: 100%;
}

#browse-preorders-btn.btn-hero-outline {
    background: linear-gradient(135deg, #fb923c, #f97316);
    border-color: rgba(249, 115, 22, 0.95);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

#browse-preorders-btn.btn-hero-outline:hover,
#browse-preorders-btn.btn-hero-outline:focus {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-color: #f97316;
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.34);
}

#available-now .products-header,
#preorder .products-header {
    align-items: flex-start;
    text-align: left;
    gap: 0.55rem;
    margin-bottom: 1.65rem;
}

#available-now .products-header .section-title,
#preorder .products-header .section-title {
    text-align: left;
    margin-bottom: 0;
}

#available-now .products-header .section-title {
    color: #16A34A;
}

#preorder .products-header .section-title {
    color: #F97316;
}

#preorder .preorder-subtitle {
    color: #5d6b62;
    text-align: left;
    margin: 0;
}

#available-now .section-refresh-btn,
#preorder .section-refresh-btn {
    display: none !important;
}

#available-grid.products-grid,
#preorder-grid.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    align-items: start;
}

:where(#featured, #available-now, #preorder) .product-card .badge {
    position: absolute;
    left: 12px;
    top: 171px;
    z-index: 3;
    margin: 0 !important;
    max-width: calc(100% - 68px);
}

:where(#featured, #available-now, #preorder) .product-card .wishlist-toggle-btn {
    top: 12px;
    right: 12px;
    z-index: 4;
}

:where(#featured, #available-now, #preorder) .product-info {
    padding-top: 1rem;
}

@media (max-width: 991px) {
    #home.hero {
        min-height: 560px;
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    #available-grid.products-grid,
    #preorder-grid.products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    :where(#featured, #available-now, #preorder) .product-card .badge {
        left: 9px;
        top: 113px;
        max-width: calc(100% - 52px);
    }

    :where(#featured, #available-now, #preorder) .product-card .wishlist-toggle-btn {
        top: 9px;
        right: 9px;
    }
}
/* ============================================================
   31. Final Desktop Landing Polish
   ============================================================ */

#home.hero .hero-overlay {
    background:
        linear-gradient(90deg, rgba(7, 12, 10, 0.66), rgba(7, 12, 10, 0.36) 48%, rgba(7, 12, 10, 0.52)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.36));
}

#browse-preorders-btn.btn-hero-outline {
    background: linear-gradient(135deg, #fb923c, #f97316) !important;
    border-color: #f97316 !important;
    color: #ffffff !important;
}

#marketplace-filter .mf-search-icon {
    left: 15px;
}

#marketplace-filter .mf-search-input {
    padding-left: 2.85rem;
}

:where(#featured, #available-now, #preorder) .product-card {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#available-grid.products-grid,
#preorder-grid.products-grid {
    align-items: stretch;
}

#featured .featured-slide {
    display: flex;
}

#featured .featured-slide .product-card,
#available-grid .product-card,
#preorder-grid .product-card {
    width: 100%;
}

:where(#featured, #available-now, #preorder) .product-info {
    flex: 1 1 auto;
    min-height: 0;
}

:where(#featured, #available-now, #preorder) .product-card-summary {
    margin-bottom: 0.35rem;
}

:where(#featured, #available-now, #preorder) .add-to-cart-btn,
#featured .featured-card-actions {
    margin-top: auto;
}

#featured .featured-card-actions {
    display: flex;
    flex-direction: column;
}


#contact .contact-form .btn[type="submit"] {
    background: #4ade80;
    border-color: #4ade80;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(74, 222, 128, 0.24);
}

#contact .contact-form .btn[type="submit"]:hover,
#contact .contact-form .btn[type="submit"]:focus {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.28);
}

#featured .featured-carousel-wrapper {
    padding: 0 3rem;
}

#featured .carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(213, 226, 217, 0.95);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #17251b;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#featured .carousel-nav:hover,
#featured .carousel-nav:focus {
    background: #ffffff;
    transform: translateY(-50%) scale(1.05);
}

#featured .carousel-nav[hidden] {
    display: none !important;
}

#featured .carousel-nav-prev {
    left: 0.2rem;
}

#featured .carousel-nav-next {
    right: 0.2rem;
}

@media (max-width: 768px) {
    #featured .featured-carousel-wrapper {
        padding: 0 2.4rem;
    }

    #featured .carousel-nav {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 576px) {
    #marketplace-filter .mf-search-input {
        padding-left: 2.65rem;
    }

    #featured .featured-carousel-wrapper {
        padding: 0 2rem;
    }

    #featured .carousel-nav {
        width: 34px;
        height: 34px;
    }
}
/* ============================================================
   32. Final UI Consistency Pass
   ============================================================ */

:where(#featured, #available-now, #preorder) .products-grid,
#featured-grid {
    align-items: stretch;
}

:where(#featured, #available-now, #preorder) .product-card,
#featured .featured-slide .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 452px;
}

:where(#featured, #available-now, #preorder) .product-info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

:where(#featured, #available-now, #preorder) .product-name {
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

:where(#featured, #available-now, #preorder) .product-price {
    min-height: 1.35em;
}

:where(#featured, #available-now, #preorder) .product-card-summary {
    display: flex;
    flex: 0 0 112px;
    flex-direction: column;
    gap: 0.34rem;
    justify-content: flex-start;
    min-height: 112px;
    max-height: 112px;
    overflow: hidden;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

:where(#featured, #available-now, #preorder) .product-card-summary > *,
:where(#featured, #available-now, #preorder) .harvest-date-display,
:where(#featured, #available-now, #preorder) .product-ship-from,
:where(#featured, #available-now, #preorder) .product-sold-left,
:where(#featured, #available-now, #preorder) .product-stock,
:where(#featured, #available-now, #preorder) .product-rating-wrap {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 18px;
    color: #6b7280 !important;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.25;
}

:where(#featured, #available-now, #preorder) .product-card-summary strong,
:where(#featured, #available-now, #preorder) .product-card-summary span,
:where(#featured, #available-now, #preorder) .product-card-summary .text-primary,
:where(#featured, #available-now, #preorder) .product-card-summary .text-success,
:where(#featured, #available-now, #preorder) .product-card-summary .text-warning {
    color: inherit !important;
    font-weight: 750;
}

:where(#featured, #available-now, #preorder) .product-stock::before {
    content: "🔥";
    color: #f97316;
    font-size: 0.88rem;
    line-height: 1;
}

:where(#featured, #available-now, #preorder) .product-stock,
:where(#featured, #available-now, #preorder) .product-stock span {
    color: #f97316 !important;
}

:where(#featured, #available-now, #preorder) .product-sold-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

:where(#featured, #available-now, #preorder) .product-sold-left::before {
    content: "\f007";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: #9ca3af;
}

:where(#featured, #available-now, #preorder) .product-ship-from::before {
    content: "📍";
    font-size: 0.88rem;
    line-height: 1;
    filter: grayscale(100%);
    opacity: 0.5;
}

:where(#featured, #available-now, #preorder) .harvest-date-display {
    color: #6b7280 !important;
    margin: 0 0 0 -320px;
    white-space: nowrap;
    font-size: 0.7rem;
}

:where(#featured, #available-now, #preorder) .harvest-date-display i {
    display: none;
}

:where(#featured, #available-now, #preorder) .harvest-date-display::before {
    content: "📅";
    font-size: 0.88rem;
    line-height: 1;
}

:where(#featured, #available-now, #preorder) .text-muted.small.mb-2 {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 18px;
    margin: 0 !important;
    color: #6b7280 !important;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.25;
}

:where(#featured, #available-now, #preorder) .text-muted.small.mb-2 i {
    display: none;
}

:where(#featured, #available-now, #preorder) .text-muted.small.mb-2::before {
    content: "🗓";
    font-size: 0.88rem;
    line-height: 1;
}

:where(#featured, #available-now, #preorder) .harvest-date-display strong,
:where(#featured, #available-now, #preorder) .harvest-date-display .text-primary,
:where(#featured, #available-now, #preorder) .harvest-date-display .text-success,
:where(#featured, #available-now, #preorder) .harvest-date-display .text-warning {
    color: #6b7280 !important;
    font-weight: 750;
    font-size: 0.75rem;
}

:where(#featured, #available-now, #preorder) .product-card-summary span[style*="9333ea"] {
    color: #f97316 !important;
}

:where(#featured, #available-now, #preorder) .add-to-cart-btn,
:where(#featured, #available-now, #preorder) .featured-card-actions,
:where(#featured, #available-now, #preorder) .product-actions {
    margin-top: auto;
}

:where(#featured, #available-now, #preorder) .featured-card-actions {
    display: flex;
    flex-direction: column;
}

:where(#featured, #available-now, #preorder) .add-to-cart-btn,
#contact .contact-form .btn[type="submit"],
#browse-preorders-btn,
#shop-now-btn,
#marketplace-filter .btn,
#marketplace-filter .mf-sort-select,
#marketplace-filter .mf-search-input {
    border-radius: 10px;
    min-height: 44px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

:where(#featured, #available-now, #preorder) .add-to-cart-btn:hover:not(:disabled),
#contact .contact-form .btn[type="submit"]:hover,
#browse-preorders-btn:hover,
#shop-now-btn:hover,
#marketplace-filter .btn:hover {
    transform: translateY(-2px);
}

#contact.contact {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

#contact .contact-content {
    align-items: stretch;
    gap: 2rem;
}

#contact .contact-info,
#contact .contact-form {
    height: 100%;
    padding: 1.75rem;
}

#contact .contact-info {
    justify-content: flex-start;
}

#contact .contact-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2ef;
}

#contact .contact-item:last-of-type {
    border-bottom: 0;
}

#contact .contact-message {
    margin-top: auto !important;
    padding-top: 1.25rem !important;
}

#contact .contact-form .form-row {
    gap: 1rem;
}

#contact .contact-form .form-group {
    margin-bottom: 1.1rem;
}

.footer {
    padding: 3.5rem 0 1.4rem;
}

.footer-content {
    gap: 3rem;
    align-items: flex-start;
    padding-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 0.95rem;
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: 0;
}

.footer-section p,
.footer-section a {
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer-section ul {
    display: grid;
    gap: 0.45rem;
}

.footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    font-size: 0.86rem;
    opacity: 0.86;
}

@media (max-width: 576px) {
    :where(#featured, #available-now, #preorder) .product-card,
    #featured .featured-slide .product-card {
        min-height: 390px;
    }

    :where(#featured, #available-now, #preorder) .product-card-summary {
        flex-basis: 104px;
        min-height: 104px;
        max-height: 104px;
    }

    :where(#featured, #available-now, #preorder) .product-card-summary > *,
    :where(#featured, #available-now, #preorder) .harvest-date-display,
    :where(#featured, #available-now, #preorder) .product-ship-from,
    :where(#featured, #available-now, #preorder) .product-sold-left,
    :where(#featured, #available-now, #preorder) .product-stock,
    :where(#featured, #available-now, #preorder) .product-rating-wrap,
    :where(#featured, #available-now, #preorder) .text-muted.small.mb-2 {
        font-size: 0.74rem;
    }

    #contact.contact {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    #contact .contact-info,
    #contact .contact-form {
        padding: 1.2rem;
    }

    .footer {
        padding-top: 2.6rem;
    }
}
/* ============================================================
   33. Customer Shopping Cart Modernization
   ============================================================ */

#cart-sidebar.cart-sidebar {
    right: 0;
    width: min(94vw, 460px);
    transform: translateX(100%);
    background: #f7faf8;
    border-left: 1px solid #dfece5;
    box-shadow: -22px 0 54px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#cart-sidebar.cart-sidebar.open {
    transform: translateX(0);
}

#cart-sidebar .cart-header {
    padding: 0.85rem 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

#cart-sidebar .cart-header h3,
#cart-sidebar .cart-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 850;
    line-height: 1.2;
}

#cart-sidebar .cart-close,
#cart-sidebar .close-cart,
#cart-sidebar #close-cart-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: transform 0.18s ease, background 0.18s ease;
}

#cart-sidebar .cart-close:hover,
#cart-sidebar .close-cart:hover,
#cart-sidebar #close-cart-btn:hover {
    transform: scale(1.05);
}

#cart-sidebar .cart-items {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.7rem;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

#cart-sidebar .cart-items::-webkit-scrollbar {
    width: 8px;
}

#cart-sidebar .cart-items::-webkit-scrollbar-thumb {
    background: rgba(22, 163, 74, 0.24);
    border-radius: 999px;
}

#cart-sidebar .cart-farmer-group {
    margin-bottom: 0.7rem;
    overflow: hidden;
    border: 1px solid #e2ece6;
    border-radius: 14px;
    background: #f8fbf9;
    box-shadow: 0 8px 20px rgba(23, 37, 27, 0.06);
}

#cart-sidebar .cart-farmer-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    background: linear-gradient(180deg, #ffffff, #f4faf6);
    border-bottom: 2px solid #d4e8d6;
}

#cart-sidebar .cart-farmer-info {
    min-width: 0;
}

#cart-sidebar .cart-farmer-name {
    max-width: 100%;
    overflow: hidden;
    color: #17251b;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cart-sidebar .cart-farmer-shipping {
    margin-top: 0.1rem;
    color: #9ca3af;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.15;
}

#cart-sidebar .cart-farmer-products {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem 0.5rem 1.2rem;
    background: #ffffff;
}

#cart-sidebar .cart-item {
    display: grid;
    grid-template-columns: auto 48px minmax(0, 1fr);
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    padding: 0.5rem;
    border: 1px solid #e2ece6;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 37, 27, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

#cart-sidebar .cart-item:hover {
    transform: translateY(-1px);
    border-color: rgba(22, 163, 74, 0.28);
    box-shadow: 0 8px 18px rgba(23, 37, 27, 0.07);
}

#cart-sidebar .cart-item-image {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #eef3ef;
    box-shadow: none;
}

#cart-sidebar .cart-item-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 0.5rem;
    row-gap: 0.2rem;
    min-width: 0;
    align-items: center;
    text-align: left;
}

#cart-sidebar .cart-item-name {
    grid-column: 1;
    min-width: 0;
    margin: 0;
    color: #17251b;
    font-size: 0.8rem;
    font-weight: 850;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
}

#cart-sidebar .cart-item-name .badge,
#cart-sidebar .cart-item-name .status-pill {
    vertical-align: middle;
}

#cart-sidebar .cart-item-price {
    grid-column: 1;
    color: #5f6f66;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#cart-sidebar .cart-item-stock {
    grid-column: 1;
    color: #6b7280 !important;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#cart-sidebar .cart-item-total {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    color: #07833e;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#cart-sidebar .cart-item-quantity {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    min-width: 0;
    align-self: center;
}

#cart-sidebar .quantity-controls {
    display: inline-grid;
    grid-template-columns: 28px 32px 28px;
    align-items: center;
    height: 28px;
    overflow: hidden;
    border: 1px solid #dfe8e2;
    border-radius: 999px;
    background: #f8fbf9;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#cart-sidebar .quantity-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #17251b;
    font-size: 0.85rem;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

#cart-sidebar .quantity-btn:hover:not(:disabled) {
    background: #e8f7ee;
    color: #128343;
    transform: none;
}

#cart-sidebar .quantity-btn:disabled {
    color: #cbd5d1;
    background: transparent;
}

#cart-sidebar .quantity-value-input {
    width: 32px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-left: 1px solid #e3ebe6;
    border-right: 1px solid #e3ebe6;
    border-radius: 0;
    background: #ffffff;
    color: #17251b;
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
    box-shadow: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

#cart-sidebar .quantity-value-input::-webkit-inner-spin-button,
#cart-sidebar .quantity-value-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#cart-sidebar .quantity-value-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.18);
}

#cart-sidebar .remove-item {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    background: #fff7f7;
    color: #dc2626;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#cart-sidebar .remove-item:hover {
    background: #fee2e2;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.14);
}

#cart-sidebar .cart-selection-circle,
#cart-sidebar #cart-select-all-btn {
    width: 16px;
    height: 16px;
    min-width: 16px;
    padding: 0;
    border: 2px solid #d6e4dc;
    border-radius: 50%;
    background: #ffffff;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0;
    box-shadow: 0 2px 8px rgba(23, 37, 27, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#cart-sidebar .cart-selection-circle::after,
#cart-sidebar #cart-select-all-btn::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
}

#cart-sidebar .cart-selection-circle.selected,
#cart-sidebar #cart-select-all-btn.selected {
    border-color: #16a34a;
    background: #16a34a;
}

#cart-sidebar .cart-selection-circle.selected::after,
#cart-sidebar #cart-select-all-btn.selected::after {
    background: #ffffff;
}

#cart-sidebar .cart-selection-circle.indeterminate {
    border-color: #f97316;
    background: #f97316;
}

#cart-sidebar .cart-selection-circle.indeterminate::after {
    width: 11px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
}

#cart-sidebar .cart-selection-circle:hover,
#cart-sidebar #cart-select-all-btn:hover {
    transform: scale(1.05);
}

#cart-sidebar .cart-footer {
    flex-shrink: 0;
    padding: 0.65rem 0.8rem;
    border-top: 1px solid #dfece5;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -10px 24px rgba(23, 37, 27, 0.07);
    backdrop-filter: blur(10px);
}

#cart-sidebar .cart-all-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 32px;
    padding: 0.25rem 0.1rem 0.5rem;
    color: #17251b;
}

#cart-sidebar .cart-all-label {
    font-size: 0.84rem;
    font-weight: 800;
}

#cart-sidebar .cart-total {
    display: grid;
    gap: 0.3rem;
    padding: 0.5rem 0.8rem;
    border-top: 1px solid #eef2ef;
}

#cart-sidebar .cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #6b7280;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
}

#cart-sidebar .cart-summary-row span:first-child,
#cart-sidebar .cart-summary-row strong:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cart-sidebar .cart-summary-row span:last-child,
#cart-sidebar .cart-summary-row strong:last-child {
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cart-sidebar .cart-summary-total {
    margin-top: 0.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e0ebe4;
    color: #17251b;
    font-size: 0.95rem;
    font-weight: 850;
}

#cart-sidebar .cart-summary-total strong:last-child {
    color: #07833e;
    font-size: 1.1rem;
    font-weight: 950;
}

#cart-sidebar #checkout-btn {
    min-height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: 0;
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

#cart-sidebar #checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(34, 197, 94, 0.3);
}

#cart-sidebar #checkout-btn:disabled {
    background: #cbd5d1;
    box-shadow: none;
}

#cart-sidebar .empty-cart {
    min-height: 360px;
    margin: 0.75rem;
    padding: 2.2rem 1.4rem;
    border: 1px dashed #cfe1d5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f3faf5);
    color: #5f6f66;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
}

#cart-sidebar .empty-cart i {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #e8f7ee;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
}

#cart-sidebar .empty-cart p {
    margin: 0;
    font-weight: 800;
    color: #17251b;
}

#cart-sidebar .empty-cart p + p {
    color: #6b7280 !important;
    font-weight: 650;
}

#cart-sidebar .empty-cart .btn {
    min-height: 44px;
    border-radius: 12px;
    padding: 0.7rem 1.15rem;
    font-weight: 850;
}

#cart-sidebar button,
#cart-sidebar .btn {
    border-radius: 10px;
}

@media (max-width: 576px) {
    #cart-sidebar.cart-sidebar {
        width: 100vw;
        max-width: 100vw;
    }

    #cart-sidebar .cart-items {
        padding: 0.55rem;
    }

    #cart-sidebar .cart-item {
        grid-template-columns: auto 58px minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }

    #cart-sidebar .cart-item-image {
        width: 58px;
        height: 58px;
        min-width: 58px;
        border-radius: 10px;
    }

    #cart-sidebar .cart-item-quantity {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }

    #cart-sidebar .cart-item-total {
        text-align: right;
    }

    #cart-sidebar .quantity-controls {
        grid-template-columns: 34px 36px 34px;
        height: 34px;
    }

    #cart-sidebar .quantity-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    #cart-sidebar .quantity-value-input {
        width: 36px;
        height: 34px;
        min-height: 34px;
    }

    #cart-sidebar .remove-item {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
}
/* ============================================================
   END
   ============================================================ */
