/**
 * E-Commerce Plugin - Frontend Styles
 *
 * Styles for the shop pages (product grid, cart, checkout).
 * Designed to work with the theme's existing styles.
 *
 * @package Ecommerce
 * @version 1.0.0
 */

/* ============================================================================
   THEME COLORS - Match Gallery Theme (Gold #b8860b)
   ============================================================================ */

:root {
    /* Primary colors - Gold theme to match main site */
    --primary-color: #b8860b;         /* Gallery gold */
    --primary-color-dark: #8b6508;    /* Darker gold for hover states */
    --primary-color-light: #d4a84b;   /* Lighter gold for backgrounds */

    /* Override Bootstrap's primary color variables */
    --bs-primary: #b8860b;
    --bs-primary-rgb: 184, 134, 11;
    --bs-link-color: #8b6508;
    --bs-link-hover-color: #b8860b;
}

/* ============================================================================
   BOOTSTRAP OVERRIDES - Global Button Styles
   ============================================================================ */

/* Primary buttons - GLOBAL override (no parent class required) */
.btn-primary {
    background-color: #b8860b !important;
    border-color: #b8860b !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:active {
    background-color: #8b6508 !important;
    border-color: #8b6508 !important;
    color: #fff !important;
}

.btn-primary:focus,
.btn-primary:focus-visible {
    background-color: #b8860b !important;
    border-color: #b8860b !important;
    box-shadow: 0 0 0 0.25rem rgba(184, 134, 11, 0.5) !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: #d4a84b !important;
    border-color: #d4a84b !important;
}

/* Outline primary buttons - GLOBAL override */
.btn-outline-primary {
    color: #b8860b !important;
    border-color: #b8860b !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: #b8860b !important;
    border-color: #b8860b !important;
    color: #fff !important;
}

.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(184, 134, 11, 0.5) !important;
}

/* Form label color - GLOBAL */
.form-label,
label.form-label {
    color: #a38628;
}

/* Form controls focus states - GLOBAL */
.form-control:focus,
.form-select:focus {
    border-color: #b8860b !important;
    box-shadow: 0 0 0 0.2rem rgba(184, 134, 11, 0.15) !important;
}

/* Accordion styles - gold highlights - GLOBAL */
.accordion-button:not(.collapsed) {
    background-color: rgba(184, 134, 11, 0.1) !important;
    color: #8b6508 !important;
}

.accordion-button:focus {
    border-color: #b8860b !important;
    box-shadow: 0 0 0 0.25rem rgba(184, 134, 11, 0.25) !important;
}

/* Pagination active state */
.page-item.active .page-link {
    background-color: #b8860b !important;
    border-color: #b8860b !important;
}

.page-link {
    color: #8b6508 !important;
}

.page-link:hover {
    color: #b8860b !important;
}

/* Badge primary */
.badge.bg-primary {
    background-color: #b8860b !important;
}

/* ============================================================================
   SHOP GRID
   ============================================================================ */

.ecommerce-shop .gallery-main {
    padding: 2rem 0;
}

.ecommerce-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.ecommerce-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ecommerce-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ecommerce-product-card-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.ecommerce-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ecommerce-product-card:hover .ecommerce-product-card-image img {
    transform: scale(1.05);
}

.ecommerce-product-card-body {
    padding: 1rem;
}

.ecommerce-product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.ecommerce-product-card-title a {
    color: inherit;
    text-decoration: none;
}

.ecommerce-product-card-title a:hover {
    color: var(--primary-color, #667eea);
}

.ecommerce-product-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.ecommerce-product-card-price-from {
    font-size: 0.875rem;
    font-weight: 400;
    color: #666;
}

/* ============================================================================
   PRODUCT PAGE
   ============================================================================ */

.ecommerce-product {
    padding: 2rem 0;
}

.ecommerce-product-gallery {
    position: sticky;
    top: 2rem;
}

.ecommerce-product-main-image {
    border-radius: 4px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.ecommerce-product-main-image img {
    max-width: 85%;
    max-height: 500px;
    height: auto;
    width: auto;
    border: 6px solid #000000;
    outline: 2px solid hsl(44 71% 49% / 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 1.25), 0 2px 4px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.ecommerce-product-thumbnails {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ecommerce-product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.ecommerce-product-thumbnail.active,
.ecommerce-product-thumbnail:hover {
    border-color: var(--primary-color, #667eea);
}

.ecommerce-product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecommerce-product-info {
    padding: 1rem 0;
}

.ecommerce-product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ecommerce-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.ecommerce-product-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Variant Selector */
.ecommerce-variant-selector {
    margin-bottom: 1.5rem;
}

.ecommerce-variant-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ecommerce-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ecommerce-variant-option {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.ecommerce-variant-option:hover {
    border-color: var(--primary-color, #667eea);
}

.ecommerce-variant-option.selected {
    border-color: var(--primary-color, #667eea);
    background-color: var(--primary-color, #667eea);
    color: #fff;
}

.ecommerce-variant-option.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Cascading Dropdown Variant Selector */
.ecommerce-variant-selector .form-select {
    max-width: 100%;
    padding: 0.75rem 2.25rem 0.75rem 0.75rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.ecommerce-variant-selector .form-select:focus {
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    outline: none;
}

.ecommerce-variant-selector .form-label {
    color: #333;
    margin-bottom: 0.5rem;
}

/* Stock status text colors inside stock status div */
.ecommerce-stock-status .in-stock {
    color: #28a745;
}

.ecommerce-stock-status .low-stock {
    color: #ffc107;
}

.ecommerce-stock-status .out-of-stock {
    color: #dc3545;
}

/* Add to Cart */
.ecommerce-add-to-cart {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.ecommerce-quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.ecommerce-quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s ease;
}

.ecommerce-quantity-btn:hover {
    background: #e0e0e0;
}

.ecommerce-quantity-input input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.ecommerce-add-to-cart-btn {
    flex: 1;
    padding: 0.75rem 2rem;
    background-color: var(--primary-color, #667eea);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ecommerce-add-to-cart-btn:hover {
    background-color: var(--primary-color-dark, #5a6fd6);
}

.ecommerce-add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Stock Status */
.ecommerce-stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.ecommerce-stock-status.in-stock {
    color: #28a745;
}

.ecommerce-stock-status.low-stock {
    color: #ffc107;
}

.ecommerce-stock-status.out-of-stock {
    color: #dc3545;
}

/* ============================================================================
   CART
   ============================================================================ */

.ecommerce-cart {
    padding: 2rem 0;
}

.ecommerce-cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.ecommerce-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.ecommerce-cart-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
}

.ecommerce-cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

input.ecommerce-cart-quantity {
    min-width: 4rem !important;
    width: 4rem !important;
    text-align: center;
    -moz-appearance: textfield;
}

input.ecommerce-cart-quantity::-webkit-outer-spin-button,
input.ecommerce-cart-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ecommerce-cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.ecommerce-cart-item-name {
    font-weight: 600;
}

.ecommerce-cart-item-variant {
    font-size: 0.875rem;
    color: #666;
}

.ecommerce-cart-remove {
    color: #dc3545;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0.5rem;
}

.ecommerce-cart-remove:hover {
    text-decoration: underline;
}

.ecommerce-cart-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
}

.ecommerce-cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.ecommerce-cart-summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    border-top: 2px solid #ddd;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.ecommerce-checkout-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color, #667eea);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.2s ease;
}

.ecommerce-checkout-btn:hover {
    background-color: var(--primary-color-dark, #5a6fd6);
    color: #fff;
}

.ecommerce-checkout-btn:disabled,
.ecommerce-checkout-btn.disabled {
    background-color: #d1d5db !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

/* ============================================================================
   DISCOUNT CODE
   ============================================================================ */

.ecommerce-discount-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ecommerce-discount-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ecommerce-discount-btn {
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.ecommerce-discount-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #d4edda;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.ecommerce-discount-remove {
    color: #dc3545;
    cursor: pointer;
    background: none;
    border: none;
}

/* ============================================================================
   SHOP FILTER BAR
   ============================================================================ */

.shop-filter-bar {
    border: 1px solid #e0e0e0;
}

.shop-filter-bar .form-select,
.shop-filter-bar .form-control {
    font-size: 0.9rem;
}

.shop-filter-bar .input-group-text {
    border-color: #dee2e6;
}

.shop-filter-bar .form-control:focus {
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.shop-filter-bar .form-select:focus {
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* Search clear button */
#search-clear {
    background: #fff;
    border-color: #dee2e6;
    color: #6c757d;
    padding: 0.375rem 0.75rem;
}

#search-clear:hover {
    background: #f8f9fa;
    color: #dc3545;
}

/* ============================================================================
   SHIPPING OPTIONS
   ============================================================================ */

.shipping-group.card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.shipping-group .card-body {
    padding: 1.25rem;
}

.shipping-group-header {
    border-bottom-color: #e9ecef !important;
}

.shipping-group-header h6 {
    font-size: 1rem;
    color: #333;
}

.shipping-rate-option {
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fff;
}

.shipping-rate-option:hover {
    background: #f8f9fa;
    border-color: var(--primary-color, #667eea) !important;
}

.shipping-rate-option.selected {
    border-color: var(--primary-color, #667eea) !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.02) 100%);
    box-shadow: 0 0 0 1px var(--primary-color, #667eea);
}

.shipping-rate-option.recommended {
    border-color: #28a745 !important;
}

.shipping-rate-option.recommended.selected {
    border-color: var(--primary-color, #667eea) !important;
}

.shipping-rate-price {
    min-width: 70px;
}

.shipping-combined-total {
    color: var(--primary-color, #667eea);
}

.production-time-notice {
    font-size: 0.9rem;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .ecommerce-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .ecommerce-add-to-cart {
        flex-direction: column;
    }

    .ecommerce-add-to-cart-btn {
        width: 100%;
    }

    .ecommerce-cart-table {
        display: block;
    }

    .ecommerce-cart-table thead {
        display: none;
    }

    .ecommerce-cart-table tr {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #eee;
    }

    .ecommerce-cart-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }

    .ecommerce-cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
    }

    /* Cart items table — compact mobile layout */
    .ecommerce-cart-items thead {
        display: none;
    }

    .ecommerce-cart-items .ecommerce-cart-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
        border-bottom: 1px solid #eee;
    }

    .ecommerce-cart-items .ecommerce-cart-item td {
        padding: 0;
        border: none;
    }

    /* Image: small and fixed */
    .ecommerce-cart-items .ecommerce-cart-item td:first-child {
        flex-shrink: 0;
    }

    .ecommerce-cart-items .ecommerce-cart-item td:first-child img {
        width: 56px !important;
        height: 56px !important;
    }

    /* Details: fill remaining space */
    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(2) {
        flex: 1;
        min-width: 0;
    }

    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(2) h6 {
        font-size: 0.8125rem;
        margin-bottom: 0.125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(2) .small {
        font-size: 0.75rem;
    }

    /* Quantity: compact */
    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(3) {
        flex-shrink: 0;
    }

    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(3) .input-group {
        max-width: 100px !important;
    }

    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(3) .ecommerce-cart-quantity {
        min-width: 2.5rem !important;
        width: 2.5rem !important;
    }

    /* Total: compact */
    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(4) {
        flex-shrink: 0;
        font-size: 0.8125rem;
    }

    /* Remove: compact */
    .ecommerce-cart-items .ecommerce-cart-item td:nth-child(5) {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .ecommerce-product-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   LIMITED EDITION BADGES & DISPLAYS
   ============================================================================ */

/* Edition Info Box - Product Page */
.ecommerce-edition-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ecommerce-edition-info.scarcity {
    background: linear-gradient(135deg, #fff3cd 0%, #fff 100%);
    border-color: #ffc107;
}

.ecommerce-edition-info.sold-out {
    background: linear-gradient(135deg, #fff3cd 0%, #fff 100%);
    border-color: #b8860b;
}

.ecommerce-edition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
}

.ecommerce-edition-badge i {
    color: #6c757d;
}

.ecommerce-edition-details {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.ecommerce-edition-details .edition-remaining {
    font-weight: 600;
    color: #333;
}

.ecommerce-edition-scarcity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #856404;
}

.ecommerce-edition-scarcity i {
    color: #ffc107;
}

.ecommerce-edition-complete {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #856404;
}

.ecommerce-edition-complete i {
    color: #b8860b;
}

/* Scarcity Badge on Product Cards - Top Middle */
.ecommerce-scarcity-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    z-index: 5;
}

.ecommerce-scarcity-badge span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #dc3545;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.ecommerce-scarcity-badge span i {
    font-size: 0.75rem;
}

/* Edition badge on product card (top corner) */
.ecommerce-edition-corner-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

/* Sold Out Overlay */
.ecommerce-sold-out-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ecommerce-sold-out-overlay span {
    background: #3541dc;
    color: #fff;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================================
   PRODUCT TYPE BADGES (Original / Reproduction)
   ============================================================================ */

.ecommerce-type-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.ecommerce-badge-original {
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    color: #1a1a1a;
}

.ecommerce-badge-reproduction {
    background: #6e654b;
    color: #ffffff;
}

/* ============================================================================
   SHOP PAGE MOBILE — Scrollable pills, compact layout
   ============================================================================ */

/* Art taxonomy filter bar (item 12) — L2 Type + L3 Subject rows.
   Labeled rows of readable gold-accented pills, in line with the gallery theme. */
.shop-taxonomy-bar {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1.25rem 0 2.5rem;
}
.shop-taxonomy-bar .tax-row {
    display: flex;
    align-items: baseline;
    gap: 0.45rem 0.85rem;
}
.shop-taxonomy-bar .tax-row-label {
    flex: 0 0 auto;
    min-width: 62px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gallery-text-muted, #8a8682);
    padding-top: 0.15rem;
}
.shop-taxonomy-bar .tax-options {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.shop-taxonomy-bar .tax-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.95rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: #ffffff;
    /* The gallery theme paints <a> text via -webkit-text-fill-color, which beats
       plain `color`; override it so the white pill text actually renders. */
    -webkit-text-fill-color: #ffffff;
    background: #7a7a7a;
    border: 1px solid var(--gallery-border, #e8e6e3);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.shop-taxonomy-bar .tax-pill:hover {
    background: #8a8a8a;
    border-color: var(--gallery-gold, #b8860b);
}
.shop-taxonomy-bar .tax-pill.active {
    background: var(--gallery-gold, #b8860b);
    border-color: var(--gallery-gold, #b8860b);
    color: #fff;
    /* Match the base rule's text-fill override (else the base #000 would win here). */
    -webkit-text-fill-color: #fff;
}
/* Checkbox-style options for the multi-select Tags (L3) row — visually distinct
   from the single-select Medium/Type pills so it's obvious you can pick several
   (and that one artwork can carry several tags). Still anchor links (toggle a tag
   in/out of the URL); the box just makes the multi-select affordance clear. */
.shop-taxonomy-bar .tax-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.2rem;
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
    color: var(--gallery-text, #2c2825);
    text-decoration: none;
}
.shop-taxonomy-bar .tax-check .tax-box {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--gallery-border, #d8d5d0);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.shop-taxonomy-bar .tax-check:hover .tax-box {
    border-color: var(--gallery-gold, #b8860b);
}
.shop-taxonomy-bar .tax-check.active {
    font-weight: 600;
}
.shop-taxonomy-bar .tax-check.active .tax-box {
    background: var(--gallery-gold, #b8860b);
    border-color: var(--gallery-gold, #b8860b);
}
/* "Showing N of M" — sits beside the artist grid heading (one clear total, next to
   the title), so overlapping tag counts don't make the catalogue look bigger than it
   is. Sized down + muted so it reads as a subtitle of the bold heading. */
.ap-showing {
    /* Easy sans font (matches the shop), sized relative to the heading: 0.6em − 10%. */
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.9em;
    font-weight: 600;
    color: #b38416;
    vertical-align: middle;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Subcategory pills — scrollable row with arrow indicators */
.shop-pills-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

/* Scroll arrow buttons — full-height dark rectangles with gold chevrons */
.shop-pills-wrapper .scroll-arrow-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    padding: 0;
    border: 0;
    background: #b2862a;
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.shop-pills-wrapper .scroll-arrow-btn:hover,
.shop-pills-wrapper .scroll-arrow-btn:focus {
    background: #8f6a1e;
    color: #fff;
    outline: none;
}
.shop-pills-wrapper .scroll-arrow-prev { left: 0; opacity: 0; pointer-events: none; border-radius: 0 6px 6px 0; }
.shop-pills-wrapper .scroll-arrow-next { right: 0; opacity: 1; border-radius: 6px 0 0 6px; }

.shop-pills-wrapper.scrolled-start .scroll-arrow-prev { opacity: 0; pointer-events: none; }
.shop-pills-wrapper.scrolled-start .scroll-arrow-next { opacity: 1; pointer-events: auto; }
.shop-pills-wrapper.scrolled-middle .scroll-arrow-prev,
.shop-pills-wrapper.scrolled-middle .scroll-arrow-next { opacity: 1; pointer-events: auto; }
.shop-pills-wrapper.scrolled-end .scroll-arrow-prev { opacity: 1; pointer-events: auto; }
.shop-pills-wrapper.scrolled-end .scroll-arrow-next { opacity: 0; pointer-events: none; }
.shop-pills-wrapper.no-overflow .scroll-arrow-prev,
.shop-pills-wrapper.no-overflow .scroll-arrow-next { opacity: 0; pointer-events: none; }

.shop-subcategory-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
}

.shop-subcategory-pills::-webkit-scrollbar {
    display: none;
}

.shop-subcategory-pills .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Clear filters × button */
.shop-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #6c757d;
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.shop-clear-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* Shop title bar */
.shop-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 576px) {
    .shop-title-bar-stacked {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .shop-title-bar-stacked > div:last-child {
        align-self: flex-end;
    }

    .shop-page-title {
        font-size: 1.25rem;
    }

    #filter-sort {
        font-size: 0.75rem;
    }
}

/* Delivery Method Selector */
.delivery-method-option {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.delivery-method-option:hover {
    border-color: var(--primary-color, #667eea);
    background: #f8f9ff;
}

.delivery-method-option.selected {
    border-color: var(--primary-color, #667eea);
    background: #f0f2ff;
    box-shadow: 0 0 0 1px var(--primary-color, #667eea);
}

.delivery-method-option .form-check-input {
    display: none;
}

.shipping-rate-option {
    cursor: pointer;
    transition: all 0.15s ease;
}

.shipping-rate-option:hover {
    background-color: #f8f9fa;
}

.shipping-rate-option.selected {
    border-color: var(--primary-color, #667eea) !important;
    background-color: #f0f2ff;
}
