/* Products Grid */
/* Filter Pill Buttons */
.filter-buttons-container {
    display: flex;
    gap: 12px;
    padding: 0 0 12px 0; /* NO padding-right fisso */
    position: relative;
    transition: padding 0.2s ease;
    align-items: flex-start;
    min-height: 44px;
}

.filter-pill-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 44px;
}

.filter-pill-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

.filter-count {
    background: var(--primary-blue);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.filter-reset-btn {
    position: absolute;
    top: 0;
    right: 0;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.filter-reset-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.filter-reset-btn svg {
    stroke: currentColor;
    width: 18px;
    height: 18px;
}

/* Filter Modal (Bottom Sheet) */
.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
}

.filter-modal.active {
    display: flex;
}

.filter-modal-content {
    background: #1a1a1a;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.filter-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-modal-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-action-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.filter-action-btn.clear {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.filter-action-btn.apply {
    background: var(--primary-blue);
    color: var(--text-primary);
}

.filter-action-btn:active {
    transform: scale(0.98);
}

.filter-modal-body {
    overflow-y: auto;
    padding: 16px 20px 20px;
    flex: 1;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 8px;
    position: relative;
}

.filter-checkbox:active {
    background: rgba(255, 255, 255, 0.05);
}

.filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    outline: none;
}

.filter-checkbox input[type="checkbox"]:checked {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.filter-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: translate(-50%, -60%) rotate(45deg);
    pointer-events: none;
}

.filter-checkbox span {
    font-size: 15px;
    color: #ccc;
    flex: 1;
}

/* Quantity Modal */
.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.quantity-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.quantity-product-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.quantity-price {
    font-size: 16px;
    color: var(--primary-blue);
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.quantity-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

#quantityInput {
    width: 80px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    font-family: inherit;
}

.submit-quantity-btn {
    width: 100%;
    background: rgba(0, 122, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 16px rgba(0, 122, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.submit-quantity-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.submit-quantity-btn:hover::before {
    left: 100%;
}

.submit-quantity-btn:active {
    transform: scale(0.96);
    background: rgba(0, 122, 255, 0.95);
    box-shadow:
        0 4px 8px rgba(0, 122, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 0;
}

.no-products {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 14px;
}

/* Product Card */
.product-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-light);
    -webkit-backdrop-filter: var(--blur-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.product-card:active {
    transform: scale(0.98);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 200px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-category-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #fff;
    font-weight: 500;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.product-farm {
    font-size: 12px;
    color: #888;
}

.product-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    margin-bottom: 12px;
}

.product-description {
    font-size: 13px;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 12px;
}

.product-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.price-tag {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
}

.product-stock {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* Product Detail Page */
.product-detail-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 80px;
}

.product-detail-image-container {
    position: relative;
    width: 100%;
    height: 350px;
}

.product-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

video.product-detail-image {
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

video.product-detail-image::-webkit-media-controls {
    display: flex !important;
    pointer-events: auto !important;
}

video.product-detail-image::-webkit-media-controls-panel {
    display: flex !important;
    pointer-events: auto !important;
}

.product-category-tag {
    pointer-events: none;
    z-index: 10;
}

.product-detail-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.product-detail-farm {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 16px;
    font-weight: 500;
}

.product-detail-description {
    font-size: 14px;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 13px;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.product-prices-detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.price-tag-detail {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    padding: 8px 2px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-tag-detail:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.stock-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 11px;
    color: #666;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
}

.cart-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.stock-badge-inline {
    font-size: 11px;
    color: #666;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
    margin: 0;
}

.product-detail-info {
    padding: 20px;
    position: relative;
    padding-bottom: 20px;
}
