/* External Buyer Portal - White Theme Design */

:root {
    --white-bg: #ffffff;
    --grey-bg: #111335;
    --grey-border: #2d4a8a;
    --text-dark: #ffffff;
    --text-medium: #a0aec0;
    --text-light: #a0aec0;
    --accent-purple: #a855f7;
    --accent-green: #4ade80;
    --accent-blue: #233f81;
    --accent-orange: #f97316;
    --accent-yellow: #ecb850;
    --accent-red: #ef4444;
    --hover-bg: #2d4a8a;
    --table-header-bg: #111335;
    --border-radius: 8px;

    /* New Brand Colors */
    --brand-navy: #111335;
    --brand-blue: #233f81;
    --brand-blue-light: #2d4a8a;
    --brand-gold-dark: #c18645;
    --brand-gold-light: #ecb850;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--brand-navy);
    color: var(--text-dark);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    padding-top: 100px;
}

/* Header */
.header-and-layout-wrapper {
    display: flex;
    position: relative;
}

.portal-header {
    background-color: var(--brand-gold-light);
    border-bottom: 1px solid var(--brand-gold-dark);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.portal-header-left {
    flex: 0 0 280px;
}

.header-text {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
}

.header-dropdown {
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.header-dropdown:hover {
    background-color: var(--hover-bg);
}

.header-icon {
    background: none;
    border: none;
    color: var(--brand-navy);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
}

.header-icon:hover {
    background-color: var(--brand-gold-dark);
    color: var(--brand-navy);
}

.portal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
}

/* Location Dropdown Button */
.location-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    border: 2px solid var(--brand-gold-light);
    border-radius: 6px;
    padding: 8px 14px;
    color: var(--brand-gold-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.location-dropdown-btn:hover {
    background-color: var(--brand-gold-light);
    border-color: var(--brand-gold-light);
    color: var(--brand-navy);
}

.location-dropdown-btn:hover .location-icon,
.location-dropdown-btn:hover .dropdown-chevron {
    color: var(--brand-navy);
}

.location-dropdown-btn .location-icon {
    color: var(--brand-gold-light);
    font-size: 14px;
}

.location-dropdown-btn .location-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-dropdown-btn .dropdown-chevron {
    color: var(--brand-gold-light);
    font-size: 12px;
    transition: transform 0.2s;
}

.location-dropdown-btn.open .dropdown-chevron {
    transform: rotate(180deg);
}

/* AMAZE Header Section */
.amaze-header-section {
    background-color: var(--brand-navy);
    border-bottom: 2px solid var(--brand-blue);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.amaze-header-left {
    flex: 1;
}

.amaze-header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.amaze-header-icon {
    background: none;
    border: none;
    color: var(--brand-gold-light);
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.amaze-header-icon:hover {
    background-color: rgba(236, 184, 80, 0.15);
}

.amaze-header-icon #cart-count-badge,
#cart-count-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--brand-gold-light);
    color: var(--brand-navy);
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    margin-left: 6px;
}

.amaze-branding-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.amaze-branding-link:hover {
    opacity: 0.9;
}

.amaze-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.amaze-logo-image {
    height: 60px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    display: block;
}

.amaze-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-gold-dark) 0%, var(--brand-gold-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--brand-navy);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border: 3px solid var(--brand-gold-dark);
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(193, 134, 69, 0.3) 10px,
        rgba(193, 134, 69, 0.3) 20px
    );
}

.amaze-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.amaze-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    line-height: 1;
}

.amaze-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: var(--brand-gold-light);
    letter-spacing: 1px;
    line-height: 1;
}

/* Main Layout */
.portal-main-container {
    display: flex;
}

/* Filter Sidebar (Left) */
.filter-sidebar {
    width: 280px;
    background-color: var(--brand-navy);
    border-right: 2px solid var(--brand-blue);
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    flex-shrink: 0;
    height: 100vh;
    position: relative;
    z-index: 10;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.filter-sidebar.collapsed {
    width: 0;
    border-width: 0;
    box-shadow: none;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--brand-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 1;
    transition: opacity 0.25s ease 0.15s;
}

.filter-sidebar.collapsed .sidebar-header {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.filter-sidebar.collapsed .sidebar-header h3 {
    display: none;
}

.toggle-sidebar-btn {
    background: none;
    border: none;
    color: var(--brand-gold-light);
    cursor: pointer;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, color 0.2s ease;
}

.toggle-sidebar-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.filter-sidebar.collapsed .toggle-sidebar-btn {
    transform: rotate(180deg);
}

.sidebar-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.filter-sidebar.collapsed .sidebar-content {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: var(--brand-navy);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--brand-blue);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--brand-blue-light);
}

.filter-section {
    border-bottom: 1px solid var(--brand-blue);
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.filter-sidebar.collapsed .filter-section {
    transform: translateX(-10px);
    opacity: 0;
}

/* Staggered animation for filter sections on sidebar open */
.filter-sidebar:not(.collapsed) .filter-section:nth-child(1) { transition-delay: 0.1s; }
.filter-sidebar:not(.collapsed) .filter-section:nth-child(2) { transition-delay: 0.15s; }
.filter-sidebar:not(.collapsed) .filter-section:nth-child(3) { transition-delay: 0.2s; }
.filter-sidebar:not(.collapsed) .filter-section:nth-child(4) { transition-delay: 0.25s; }
.filter-sidebar:not(.collapsed) .filter-section:nth-child(5) { transition-delay: 0.3s; }
.filter-sidebar:not(.collapsed) .filter-section:nth-child(6) { transition-delay: 0.35s; }

.filter-section-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: white;
    transition: background-color 0.25s ease, padding-left 0.25s ease;
    position: relative;
    overflow: hidden;
}

.filter-section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand-gold-light);
    transform: scaleY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-section-header:hover {
    background-color: var(--brand-blue-light);
    padding-left: 20px;
}

.filter-section-header:hover::before {
    transform: scaleY(1);
}

.filter-section-header:active {
    background-color: rgba(255, 255, 255, 0.08);
}

.filter-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-gold-light);
    transition: transform 0.25s ease, color 0.25s ease;
}

.filter-section-header:hover .filter-icon {
    transform: scale(1.15);
    color: #fff;
}

.filter-sidebar.collapsed .filter-icon {
    width: auto;
}

.filter-section-header span {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.filter-sidebar.collapsed .filter-section-header span {
    display: none;
}

.filter-section-header i.fa-chevron-down {
    color: var(--brand-gold-light);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s ease;
}

.filter-section-header:hover i.fa-chevron-down {
    color: #fff;
}

.filter-section.collapsed .filter-section-header i.fa-chevron-down {
    transform: rotate(-90deg);
}

.filter-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-section:not(.collapsed) .filter-options {
    max-height: 500px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
    position: relative;
}

.filter-checkbox:hover {
    background-color: var(--brand-blue-light);
    padding-left: 22px;
    color: var(--brand-gold-light);
}

.filter-checkbox:active {
    background-color: rgba(255, 255, 255, 0.06);
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-gold-light);
    transition: transform 0.2s ease;
}

.filter-checkbox:hover input[type="checkbox"] {
    transform: scale(1.15);
}

.filter-checkbox span {
    font-size: 13px;
}

.filter-sidebar.collapsed .filter-checkbox span {
    display: none;
}

.potency-controls {
    padding: 16px;
}

.potency-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-sidebar.collapsed .potency-toggle {
    display: none;
}

.toggle-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--brand-blue);
    background-color: var(--brand-blue-light);
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.25s ease;
}

.toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.toggle-btn:active {
    transform: translateY(0);
}

.toggle-btn.active {
    background-color: var(--brand-gold-light);
    color: var(--brand-navy);
    border-color: var(--brand-gold-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-sidebar.collapsed .range-inputs {
    display: none;
}

.range-inputs input[type="number"] {
    width: 50px;
    padding: 6px;
    border: 1px solid var(--brand-blue);
    background-color: var(--brand-blue-light);
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

.range-inputs input[type="range"] {
    flex: 1;
    height: 4px;
    background-color: var(--brand-blue);
    border-radius: 2px;
    outline: none;
}

.range-inputs input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: var(--brand-gold-light);
    border-radius: 50%;
    cursor: pointer;
}

.range-inputs input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background-color: var(--brand-gold-light);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Product Catalog (Right Side) */
.portal-catalog {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--brand-navy);
    overflow: hidden;
}

.catalog-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--brand-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--brand-navy);
    z-index: 5;
}

.catalog-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-sidebar-toggle {
    background-color: var(--brand-gold-light);
    border: none;
    color: var(--brand-navy);
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.catalog-sidebar-toggle:hover {
    background-color: var(--brand-gold-dark);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.catalog-sidebar-toggle:active {
    transform: scale(0.97);
}

.catalog-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.catalog-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-header-icon {
    background: none;
    border: none;
    color: var(--brand-gold-light);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.catalog-header-icon:hover {
    background-color: rgba(236, 184, 80, 0.1);
}

.search-container {
    display: flex;
    align-items: center;
    gap: 0;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--brand-navy);
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    padding: 0;
    max-width: 300px;
    transition: all 0.3s ease;
    position: relative;
}

.search-input-wrapper:focus-within {
    border-color: var(--brand-gold-light);
}

.portal-search-input {
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
    background: transparent;
    color: #ffffff;
}

.portal-search-input::placeholder {
    color: #a0aec0;
}

.search-close-btn {
    background: none;
    border: none;
    color: var(--text-medium);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-close-btn:hover {
    color: var(--text-dark);
    background-color: var(--hover-bg);
}

.contact-sales-catalog-btn {
    background: none;
    border: 1px solid var(--brand-gold-light);
    color: var(--brand-gold-light);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-sales-catalog-btn:hover {
    background-color: var(--brand-gold-light);
    color: var(--brand-navy);
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 4px;
    align-items: center;
}

.view-btn {
    background: var(--brand-blue-light);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: all 0.2s;
}

.view-btn:hover {
    background-color: var(--brand-blue);
}

.view-btn.active {
    background-color: var(--brand-gold-light);
    color: var(--brand-navy);
}

.view-btn i {
    margin-right: 4px;
}

/* Product Grid View */
.product-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    padding: 12px;
}

/* Product Card (Grid View) */
.product-card {
    position: relative;
    background-color: var(--brand-blue);
    border: 1px solid var(--brand-blue-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border-color: var(--brand-gold-light);
    z-index: 1;
}

.product-card-header {
    position: relative;
    padding: 0;
    background-color: var(--brand-navy);
    overflow: hidden;
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--brand-navy);
}

.product-brand-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 8px;
    background-color: #8C7BBF;
    color: white;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    margin-top: 0;
}

.placeholder-icon {
    font-size: 64px;
    opacity: 0.2;
}

.product-card-body {
    padding: 16px;
    background-color: var(--brand-blue);
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    margin: 12px 0 4px 0;
    color: #ffffff;
    line-height: 1.3;
}

.thc-bar {
    height: 36px;
    border-radius: 6px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    width: 100%;
}

.thc-bar.indica {
    background-color: #4a90e2;
}

.thc-bar.hybrid {
    background-color: #4a90e2;
}

.thc-bar.sativa {
    background-color: #4a90e2;
}

.product-variant {
    font-size: 14px;
    color: var(--brand-gold-light);
    font-weight: 600;
    margin: 12px 0 4px 0;
}

.product-type {
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 16px;
}

.price-section {
    margin: 16px 0;
}

.price-case {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.5;
    margin-bottom: 8px;
}

.price-section .unit-price-tag {
    display: inline-block;
    margin-top: 8px;
    margin-bottom: 0;
}

.price-amount {
    font-weight: 700;
}

.price-rest {
    font-weight: 400;
}

.quantity-bold {
    font-weight: 700;
}

.quantity-available {
    font-size: 14px;
    font-weight: 400;
    color: #a0aec0;
    margin: 4px 0;
}

.price-section .detail-line {
    font-size: 13px;
    color: #a0aec0;
    margin: 4px 0;
}

.product-details {
    margin-bottom: 16px;
}

.detail-line {
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 6px;
    line-height: 1.5;
}

.unit-price-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--brand-navy);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-gold-light);
    margin-top: 8px;
    margin-bottom: 8px;
}

.quantity-selector-container {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}

.quantity-input {
    flex: 1;
    background-color: var(--brand-navy);
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
}

.quantity-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.add-to-cart-btn {
    background-color: var(--brand-gold-dark);
    color: var(--brand-navy);
    border: none;
    border-radius: 6px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.add-to-cart-btn:hover {
    background-color: var(--brand-gold-light);
    transform: scale(1.05);
}

/* Product Table View */
.product-table-view {
    display: none;
    padding: 12px;
}

.product-table-view.active {
    display: block;
}

.products-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.products-table thead {
    background-color: var(--brand-navy);
    position: sticky;
    top: 100px;
    z-index: 10;
}

.products-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-gold-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--brand-blue);
    white-space: nowrap;
    background-color: var(--brand-navy);
}

.products-table th:hover {
    background-color: var(--brand-blue);
}

.products-table tbody tr {
    border-bottom: 1px solid var(--brand-blue);
    transition: background-color 0.2s;
    cursor: pointer;
    background-color: var(--brand-blue);
}

.products-table tbody tr:hover {
    background-color: var(--brand-blue-light);
}

.products-table td {
    padding: 16px;
    font-size: 13px;
    color: #ffffff;
    vertical-align: middle;
}

.table-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-product-image-container {
    position: relative;
    display: inline-block;
}

.table-product-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.table-product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.table-product-image .placeholder-icon {
    font-size: 24px;
}

/* Hover preview for table images */
.table-image-hover-preview {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    display: none;
    background: var(--brand-blue);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 8px;
    max-width: 400px;
    max-height: 400px;
    border: 2px solid var(--brand-gold-light);
}

.table-image-hover-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.table-product-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.table-product-details p {
    margin: 0;
    font-size: 12px;
    color: #a0aec0;
}

.table-batch {
    font-size: 13px;
    color: #ffffff;
}

.table-category {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--brand-navy);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-gold-light);
}

.table-thc {
    font-size: 13px;
    color: #ffffff;
}

.table-quantity {
    font-size: 13px;
    color: #ffffff;
}

.table-price-main {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-gold-light);
}

.table-price-unit {
    font-size: 12px;
    color: #a0aec0;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-qty-input {
    width: 60px;
    background-color: var(--brand-navy);
    border: 1px solid var(--brand-blue-light);
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
    color: #ffffff;
}

.table-add-btn {
    background-color: var(--brand-gold-dark);
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-navy);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.table-add-btn:hover {
    background-color: var(--brand-gold-light);
}

/* Shopping Cart Sidebar (Right Side) */
.portal-cart {
    width: 420px;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1002;
}

.portal-cart:not(.collapsed) {
    transform: translateX(0);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-container {
    background-color: var(--brand-blue);
    border: 1px solid var(--brand-blue-light);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--brand-blue-light);
}

.cart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-gold-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-logo-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.cart-dropdown {
    cursor: pointer;
    color: #a0aec0;
}

.cart-instruction {
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 16px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.cart-item {
    background-color: var(--brand-navy);
    border: 1px solid var(--brand-blue-light);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 12px;
}

.cart-item-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.cart-item-attributes {
    font-size: 11px;
    color: #a0aec0;
    line-height: 1.6;
}

.cart-item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
}

.price-label {
    font-size: 12px;
    color: #a0aec0;
}

.price-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-gold-light);
}

.cart-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.quantity-btn {
    background-color: var(--brand-blue);
    border: 1px solid var(--brand-blue-light);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: var(--brand-blue-light);
    border-color: var(--brand-gold-light);
}

.cart-item-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #ffffff;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: opacity 0.2s;
}

.remove-item-btn:hover {
    opacity: 0.7;
}

.checkout-message {
    background-color: var(--brand-navy);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #a0aec0;
    line-height: 1.6;
}

.order-summary {
    border-top: 1px solid var(--brand-blue-light);
    padding-top: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-label {
    color: #a0aec0;
}

.summary-value {
    color: #ffffff;
    font-weight: 600;
}

.summary-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-gold-light);
}

.checkout-btn {
    width: 100%;
    background-color: #4ade80;
    border: none;
    border-radius: var(--border-radius);
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 16px;
}

.checkout-btn:hover:not(:disabled) {
    background-color: #22c55e;
}

.checkout-btn:disabled {
    background-color: #9ca3af;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Discounted totals styling in checkout */
.price-strike {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 6px;
}
.price-discounted {
    color: #10b981;
    font-weight: 700;
}
.price-note {
    font-size: 12px;
    color: #6b7280;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #a0aec0;
    text-align: center;
    padding: 40px 20px;
}

.empty-cart-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Product Details Modal - White Theme */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background-color: var(--brand-blue);
    border: 1px solid var(--brand-blue-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--brand-navy);
    border: 1px solid var(--brand-blue-light);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: var(--brand-blue-light);
}

.modal-close i {
    color: #ffffff;
    font-size: 18px;
}

.modal-header {
    background-color: var(--brand-navy);
    border-bottom: 1px solid var(--brand-blue-light);
    padding: 24px 24px 16px 24px;
}

.modal-header h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.modal-header p {
    margin: 0;
    font-size: 14px;
    color: #a0aec0;
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    overflow-y: auto;
    padding: 24px;
}

.modal-left {
    border-right: 1px solid var(--brand-blue-light);
    padding-right: 24px;
}

.modal-right {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-product-image-container {
    width: 100%;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.modal-product-image-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-navy);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.modal-product-image-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.cart-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #22c55e;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.cart-status-badge i {
    font-size: 16px;
}

/* -------------------------------------------------------------
   Product-level "in cart" indicator
   Aggregates quantity across every batch of a product, so a
   customer browsing one batch sees that they already added
   another batch of the same product. Lives on:
   - .product-card (grid view)        → .in-cart-indicator
   - .product-row  (table view)       → .row-in-cart-badge
   - .modal-cart-status               → existing .cart-status-badge
   ------------------------------------------------------------- */

.product-card.has-in-cart {
    box-shadow: 0 0 0 2px rgba(236, 184, 80, 0.65), 0 4px 14px rgba(0, 0, 0, 0.18);
}

.in-cart-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-gold-dark) 0%, var(--brand-gold-light) 100%);
    color: var(--brand-navy);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    max-width: calc(100% - 20px);
}

.in-cart-indicator .in-cart-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.in-cart-indicator .in-cart-count {
    font-size: 12px;
    font-weight: 900;
}

.product-row.has-in-cart {
    background-color: rgba(236, 184, 80, 0.08);
    box-shadow: inset 3px 0 0 var(--brand-gold-light);
}

.row-in-cart-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(236, 184, 80, 0.22);
    border: 1px solid rgba(236, 184, 80, 0.7);
    color: var(--brand-gold-light);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.row-in-cart-badge .in-cart-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Mobile: keep the indicator clearly visible on small viewports.
   We compact it (icon + count only) but make it a solid colored chip
   so it still stands out at a glance. */
@media (max-width: 768px) {
    .in-cart-indicator {
        top: 6px;
        right: 6px;
        padding: 5px 8px;
        font-size: 11px;
        gap: 4px;
        min-width: 28px;
        justify-content: center;
    }

    .in-cart-indicator .in-cart-text {
        display: none;
    }

    .in-cart-indicator .in-cart-count {
        font-size: 12px;
    }

    .row-in-cart-badge {
        font-size: 10px;
        padding: 3px 7px;
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .in-cart-indicator {
        top: 4px;
        right: 4px;
        padding: 4px 7px;
    }
}

.modal-section {
    margin-bottom: 32px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-gold-light);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
}

/* Product Section Styles */
.product-type-info {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 8px;
}

.strain-tag {
    display: inline-block;
    font-weight: 700;
    color: #ffffff;
    margin-left: 8px;
}

.category-badge {
    display: inline-block;
    background-color: #4A90E2;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.genetics-info {
    font-size: 14px;
    color: #ffffff;
    margin: 12px 0;
}

.product-description {
    font-size: 14px;
    color: #a0aec0;
    line-height: 1.6;
    margin: 12px 0;
}

.product-notes {
    margin: 16px 0;
}

.product-notes p {
    font-size: 14px;
    color: #a0aec0;
    margin: 8px 0;
    line-height: 1.5;
}

.packaging-info-top {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 16px;
    font-weight: 500;
}

.batch-location-info {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 16px;
    line-height: 1.6;
}

.batch-location-info p {
    margin: 4px 0;
}

.packaging-info {
    font-size: 14px;
    color: #a0aec0;
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.attribute-tag {
    display: inline-block;
    background-color: var(--brand-navy);
    color: var(--brand-gold-light);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.batch-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 24px;
}

.batch-info p {
    margin: 0;
    line-height: 1.5;
}

.thc-display {
    margin-bottom: 32px;
}

.thc-value-large {
    font-size: 56px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 8px;
    line-height: 1;
}

.thc-label {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 16px;
}

.thc-bar-visualizer {
    position: relative;
    width: 100%;
    height: 16px;
    border-radius: 8px;
    overflow: visible;
}

.thc-bar-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: 8px;
}

.thc-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(to right, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: 8px;
    transition: width 0.3s ease;
    width: 0%;
}

.thc-marker {
    position: absolute;
    top: -6px;
    width: 28px;
    height: 28px;
    background-color: #22c55e;
    border-radius: 50%;
    border: 3px solid var(--brand-gold-light);
    transform: translateX(-50%);
    transition: left 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.testing-section {
    margin-top: 32px;
}

.testing-section .modal-section-title {
    margin-bottom: 16px;
}

.cannabinoids h5 {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.cannabinoid-box {
    background-color: var(--brand-navy);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 16px;
}

.thc-icon-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.thc-icon {
    font-size: 20px;
    color: #a0aec0;
}

.thc-icon-display span {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
}

/* Right Panel Styles */
.availability-box {
    margin-bottom: 24px;
}

.availability-quantity {
    font-size: 32px;
    font-weight: 700;
    color: var(--brand-gold-light);
    margin-bottom: 4px;
}

.availability-label {
    font-size: 12px;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-info {
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 8px;
}

.info-row span:last-child {
    font-weight: 600;
}

.pricing {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--grey-border);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.price-label {
    font-size: 14px;
    color: var(--text-dark);
}

.price-main {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
}

.price-per-unit {
    font-size: 13px;
    color: var(--text-medium);
}

.order-controls {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--grey-border);
    flex-shrink: 0;
}

.quantity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.quantity-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.quantity-input-modal {
    padding: 10px 14px;
    border: 1px solid var(--grey-border);
    border-radius: 6px;
    font-size: 14px;
    width: 120px;
    text-align: center;
    background-color: var(--brand-navy);
    color: #ffffff;
}

.quantity-input-modal:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.total-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.total-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
}

.total-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.btn-add-to-cart-modal {
    width: 100%;
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-add-to-cart-modal:hover {
    background-color: #16a34a;
}

.testing-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.testing-section h4 i {
    color: var(--accent-green);
}

.order-info {
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--grey-border);
    font-size: 14px;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span:first-child {
    color: var(--text-medium);
}

.info-row span:last-child {
    font-weight: 600;
    color: var(--text-dark);
}

.pricing {
    margin-bottom: 24px;
}

.price-main {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.price-per-unit {
    font-size: 14px;
    color: var(--text-medium);
}

.order-controls {
    margin-bottom: 24px;
}

.order-controls label {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.order-controls input {
    width: 100%;
    background-color: var(--brand-navy);
    border: 1px solid var(--grey-border);
    border-radius: var(--border-radius);
    padding: 12px;
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 16px;
}

.total-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    padding-top: 16px;
    border-top: 1px solid var(--grey-border);
}

.btn-add-to-cart-modal {
    width: 100%;
    background-color: var(--accent-green);
    border: none;
    border-radius: var(--border-radius);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-add-to-cart-modal:hover {
    background-color: #22c55e;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-medium);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--grey-border);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(2px);
}

@media (max-width: 1200px) {
    .portal-main-container {
        flex-direction: column;
    }
    
    .portal-cart {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
    }
}

@media (max-width: 968px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-left {
        border-right: none;
        border-bottom: 1px solid var(--grey-border);
        padding-right: 0;
        padding-bottom: 24px;
        margin-bottom: 24px;
    }
    
    .modal-right {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .product-grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .portal-cart {
        width: 100%;
    }

    .portal-main-container {
        padding: 0 12px;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
        box-shadow: none;
    }

    .filter-sidebar:not(.collapsed) {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }

    .filter-sidebar.collapsed {
        width: 280px;
        border-width: 2px;
        transform: translateX(-100%);
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Prevent modal opening when clicking cart controls */
.product-card-clickable .quantity-selector-container,
.product-card-clickable .add-to-cart-btn {
    pointer-events: auto;
}

.product-card-clickable .quantity-input,
.product-card-clickable .add-to-cart-btn {
    cursor: pointer;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--brand-navy);
    border-top: 1px solid var(--brand-blue);
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    bottom: 0;
    z-index: 50;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.pagination-label {
    font-size: 12px;
    color: white;
    opacity: 0.7;
}

.pagination-dropdown {
    background-color: var(--brand-blue-light);
    border: 1px solid var(--brand-blue);
    border-radius: 4px;
    padding: 4px 8px;
    color: white;
    font-size: 13px;
    cursor: pointer;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    background-color: var(--brand-blue-light);
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-gold-light);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.pagination-btn:hover {
    background-color: var(--brand-blue);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-number {
    background-color: var(--brand-blue-light);
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.pagination-number:hover {
    background-color: var(--brand-blue);
}

.pagination-number.active {
    background-color: var(--brand-gold-light);
    color: var(--brand-navy);
    font-weight: 600;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-gold-light);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    color: var(--brand-gold-dark);
    opacity: 0.8;
}

/* Checkout Page Styles */
.checkout-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    /* CRITICAL: Ensure checkout content doesn't block header clicks */
    position: relative;
    z-index: 1;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.checkout-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    color:azure;
    font-family: monospace;
    font-size: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    text-decoration: underline;
}

.back-to-store-btn {
    background-color: var(--brand-blue);
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.back-to-store-btn:hover {
    background-color: var(--brand-blue-light);
    border-color: var(--brand-gold-light);
    color: #ffffff;
}

.checkout-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Order Summary Table */
.order-summary-section {
    background-color: var(--brand-blue);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--brand-blue-light);
}

.order-summary-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--brand-gold-light);
    margin: 0 0 20px 0;
}

.order-summary-table-container {
    margin-bottom: 24px;
}

.order-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.order-summary-table thead {
    background-color: var(--brand-navy);
    border-bottom: 2px solid var(--brand-blue-light);
}

.order-summary-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-gold-light);
}

.order-summary-table td {
    padding: 16px;
    border-bottom: 1px solid var(--brand-blue-light);
    vertical-align: top;
    color: #ffffff;
}

.order-summary-table tbody tr:last-child td {
    border-bottom: none;
}

.item-name-cell {
    width: 40%;
}

.product-name-with-logo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.amaze-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-gold-dark) 0%, var(--brand-gold-light) 100%);
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.product-name-details {
    flex: 1;
}

.product-main-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.product-sub-info {
    font-size: 13px;
    color: #a0aec0;
    line-height: 1.4;
}

.item-price-cell {
    width: 15%;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-gold-light);
}

.item-quantity-cell {
    width: 25%;
}

.quantity-info {
    font-size: 14px;
    color: #ffffff;
}

.quantity-info > div:first-child {
    font-weight: 600;
    margin-bottom: 4px;
}

.units-info,
.package-size {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 4px;
}

/* Edit quantity button - updated to match new design */
.edit-quantity-btn {
    margin-top: 8px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--brand-blue-light);
    border-radius: 5px;
    background-color: var(--brand-navy);
    color: var(--brand-gold-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    font-size: 0;
}

.edit-quantity-btn:hover {
    background-color: var(--brand-blue-light);
    border-color: var(--brand-gold-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-quantity-btn:active {
    transform: scale(0.96);
}

.edit-quantity-btn::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f9fafb' viewBox='0 0 16 16'%3E%3Cpath d='M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5L13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 9.207 8.793 7.5l2.293-2.293L12.793 5.5zM8.5 8.207l1.293 1.293L7.293 11.5 6 10.207 8.5 8.207zM6 11.207l1 1-2.293 2.293-1-1L6 11.207z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.item-line-cell {
    width: 20%;
}

.line-total-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.line-total {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.remove-item-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background-color: #ef4444;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.order-total-row {
    text-align: right;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    border-top: 2px solid var(--grey-border);
}

.empty-cart-message {
    text-align: center;
    padding: 40px 20px;
}

.empty-cart-message p {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 16px;
}

.back-to-store-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.back-to-store-link:hover {
    text-decoration: underline;
}

/* Order Notes Section */
.order-notes-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--grey-border);
}

.order-notes-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.order-notes-section textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background-color: var(--brand-navy);
    color: #ffffff;
}

.order-notes-section textarea::placeholder {
    color: #a0aec0;
}

.order-notes-section textarea:focus {
    outline: none;
    border-color: var(--brand-gold-light);
}

/* Bottom Section - Shipping and Payment */
.checkout-bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.shipping-section,
.payment-section {
    background-color: var(--brand-blue);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--brand-blue-light);
}

.section-header {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--brand-gold-light);
}

.purple-header {
    color: var(--brand-gold-light);
}

.location-dropdown {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 24px;
    background-color: var(--brand-navy);
    color: #ffffff;
}

.shipping-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.shipping-form-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shipping-form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.shipping-form-grid label {
    font-size: 13px;
    font-weight: 600;
    color: #a0aec0;
}

.shipping-form-grid input {
    padding: 10px;
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--brand-navy);
    color: #ffffff;
}

.shipping-form-grid input:focus {
    outline: none;
    border-color: var(--brand-gold-light);
}

/* Payment Section */
.payment-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.payment-illustration {
    width: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-blue-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.illustration-icon {
    font-size: 64px;
    opacity: 0.5;
}

.terms-text {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 16px;
}

.sign-in-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--brand-navy);
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.sign-in-btn:hover {
    background-color: var(--brand-blue-light);
}

.final-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-gold-light);
    margin-bottom: 16px;
}

.place-order-guest-btn {
    width: 100%;
    padding: 14px;
    background-color: #22c55e;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.place-order-guest-btn:hover:not(:disabled) {
    background-color: #16a34a;
}

.place-order-guest-btn:disabled {
    background-color: var(--grey-bg);
    color: var(--text-medium);
    cursor: not-allowed;
}

/* Quantity Modal */
.quantity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-small {
    position: relative;
    width: 90%;
    max-width: 400px;
    background-color: var(--brand-blue);
    border-radius: var(--border-radius);
    padding: 24px;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid var(--grey-border);
}

.quantity-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quantity-modal-body label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

#modal-quantity-input {
    padding: 12px;
    border: 1px solid var(--grey-border);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--brand-navy);
    color: #ffffff;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.btn-cancel,
.btn-save {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background-color: var(--grey-bg);
    border: 1px solid var(--grey-border);
    color: var(--text-dark);
}

.btn-cancel:hover {
    background-color: var(--hover-bg);
}

.btn-save {
    background-color: #22c55e;
    border: none;
    color: white;
}

.btn-save:hover {
    background-color: #16a34a;
}


.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--brand-blue-light);
    border-radius: 6px;
    font-size: 14px;
    color: #ffffff;
    background-color: var(--brand-navy);
    transition: border-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-gold-light);
}

.form-group-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.order-summary-card {
    background-color: var(--brand-blue);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--grey-border);
    position: sticky;
    top: 80px;
}

.order-summary-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 20px 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--grey-border);
}

.summary-line.total {
    font-size: 18px;
    font-weight: 700;
    border-bottom: none;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid var(--grey-border);
}

.place-order-btn {
    width: 100%;
    background-color: var(--accent-green);
    border: none;
    border-radius: var(--border-radius);
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px;
}

.place-order-btn:hover:not(:disabled) {
    background-color: #22c55e;
}

.place-order-btn:disabled {
    background-color: var(--grey-bg);
    color: var(--text-medium);
    cursor: not-allowed;
}

.checkout-note {
    font-size: 12px;
    color: var(--text-medium);
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

/* Readonly form fields - non-editable shipping info */
.readonly-field {
    background-color: var(--brand-navy) !important;
    color: var(--text-medium) !important;
    cursor: not-allowed !important;
    border-color: var(--brand-blue) !important;
    opacity: 0.8;
    pointer-events: none;
}

.readonly-field:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Purchase Limit Warning */
.purchase-limit-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-red, #ef4444);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    color: var(--accent-red, #ef4444);
    font-size: 13px;
    line-height: 1.4;
}

.purchase-limit-warning svg {
    margin-top: 2px;
}

/* Disabled checkout button due to purchase limit */
.checkout-btn.checkout-limit-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: var(--text-muted, #6b7280) !important;
}
