.products-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 480px) {
    .products-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .products-row {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

.products-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 6px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scrollbar-color: transparent transparent;
    will-change: scroll-position;
    contain: layout style;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.products-scroll.gb-scroll-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.products-scroll::-webkit-scrollbar {
    display: none;
    height: 4px;
}

.products-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.products-scroll::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.gb-scroll-wrap {
    position: relative;
}

.gb-scroll-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    width: 48px;
    border: none;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.2s ease;
}

.gb-scroll-wrap:hover .gb-scroll-btn:not(:disabled),
.gb-scroll-btn:focus-visible {
    opacity: 1;
}

.gb-scroll-btn--prev {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.06), transparent);
}

.gb-scroll-btn--next {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.06), transparent);
}

.gb-scroll-btn:hover {
    background: rgba(0, 0, 0, 0.12);
}

.gb-scroll-btn:disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

[data-theme="concept-light"] .gb-scroll-btn {
    border: none;
    background: transparent;
}

[data-theme="concept-light"] .gb-scroll-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}


.gb-product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(var(--glow-rgb), 0.1), 0 0 20px rgba(var(--glow-rgb), 0.05);
}

.gb-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
    border-color: var(--accent);
}

.gb-product-card > a {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.product-image {
    aspect-ratio: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image .discount,
.discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 1;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 10px 10px;
}

.gb-product-card h3 {
    font-size: 13px;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
    color: var(--text);
    min-height: 2.7em;
    width: 100%;
}

.product-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-footer .btn-cart-icon {
    margin-left: auto;
    flex-shrink: 0;
}

.price {
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    color: var(--accent);
}



.price del {
    display: none;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 10px;
    order: 2;
}

.price ins {
    order: 1;
    text-decoration: none;
}


.gb-product-card .gb-badge {
    font-size: 10px;
    padding: 2px 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.btn-cart-icon,
.btn-cart-icon-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    flex-shrink: 0;
}

.btn-cart-icon-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.btn-cart-icon {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(var(--glow-rgb), 0.25);
}

.btn-cart-icon:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(var(--glow-rgb), 0.35);
    transform: translateY(-1px);
}

/* scrollable card overrides */
.products-scroll .gb-product-card {
    min-width: 160px;
    max-width: 180px;
    width: 170px;
    flex-shrink: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.products-scroll .gb-product-card > a {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.products-scroll .gb-product-card .product-image {
    aspect-ratio: 1;
    padding: 4px;
}

.products-scroll .gb-product-card h3 {
    min-height: 2.7em;
    font-size: 12px;
}

.products-scroll .gb-product-card .price {
    font-size: 12px;
}

.gb-cart-icon-state {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.gb-cart-icon-spinner {
    animation: gbSpin 0.6s linear infinite;
}

.btn-cart-icon.gb-cart-added {
    background: var(--success);
    color: #fff;
    box-shadow: 0 0 10px rgba(45,212,191,0.3);
}

.btn-cart-icon.gb-cart-loading {
    pointer-events: none;
    opacity: 0.7;
}

@keyframes gbSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
