/* ==========================================================================
   Velgrina — Homepage Sections
   Bestsellers slider, Category cards, Lifestyle, Social, Trust bar
   ========================================================================== */

/* ---------- Product Grid (Category Page) ---------- */
.velgrina-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 768px) {
    .velgrina-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1280px) {
    .velgrina-product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* ---------- Filter Sidebar (Category Page) ---------- */
.velgrina-filter-block {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
}

/* ---------- Design Tokens ---------- */
:root {
    --velgrina-teal: #2E7D8C;
    --velgrina-teal-hover: #246876;
    --velgrina-black: #1E2022;
    --velgrina-border: #D1D5DB;
    --velgrina-light: #F4F5F4;
    --velgrina-gray: #6B7280;
    --velgrina-success: #16a34a;
    --velgrina-red: #dc2626;
}

/* ==========================================================================
   SLIDER ARROWS  (shared across all carousels)
   ========================================================================== */
.velgrina-slider-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--velgrina-border);
    background: #fff;
    color: var(--velgrina-black);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.velgrina-slider-arrow:hover {
    background: var(--velgrina-teal);
    border-color: var(--velgrina-teal);
    color: #fff;
}

.velgrina-slider-arrow__icon {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   BESTSELLERS SLIDER
   ========================================================================== */
.velgrina-slider {
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

.velgrina-slider__track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Card wrapper — width controlled by perPage via JS */
.velgrina-slider-card {
    flex: 0 0 50%;
    min-width: 0;
    padding: 0 6px;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .velgrina-slider-card {
        flex: 0 0 33.3333%;
    }
}

@media (min-width: 1024px) {
    .velgrina-slider-card {
        flex: 0 0 25%;
    }
}

/* ==========================================================================
   PRODUCT CARD  (used inside bestsellers slider)
   ========================================================================== */
.velgrina-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--velgrina-border);
    overflow: hidden;
    transition: box-shadow 0.25s;
}

.velgrina-product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Image container */
.velgrina-product-card__image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--velgrina-light);
}

.velgrina-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.velgrina-product-card:hover .velgrina-product-card__image img {
    transform: scale(1.05);
}

/* Discount badge */
.velgrina-product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--velgrina-red);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 3px 8px;
    line-height: 1.4;
    z-index: 2;
}

/* Info section */
.velgrina-product-card__info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
    gap: 6px;
}

/* Product name */
.velgrina-product-card__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--velgrina-black);
    text-decoration: none;
    transition: color 0.2s;
}

.velgrina-product-card__name:hover {
    color: var(--velgrina-teal);
}

/* Prices */
.velgrina-product-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--velgrina-black);
}

.velgrina-product-card__price--old {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--velgrina-gray);
    text-decoration: line-through;
    margin-left: 6px;
}

/* Stock indicator */
.velgrina-product-card__stock {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.velgrina-product-card__stock--in {
    color: var(--velgrina-success);
}

.velgrina-product-card__stock-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.velgrina-product-card__stock-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Delivery time */
.velgrina-product-card__delivery {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--velgrina-gray);
    font-size: 0.6875rem;
    margin-top: 2px;
}

.velgrina-product-card__delivery svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Add-to-cart hover overlay */
.velgrina-atc-hover {
    margin-top: auto;
    padding-top: 8px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s, transform 0.25s;
}

.velgrina-product-card:hover .velgrina-atc-hover {
    opacity: 1;
    transform: translateY(0);
}

/* Always visible on touch devices */
@media (hover: none) {
    .velgrina-atc-hover {
        opacity: 1;
        transform: translateY(0);
    }
}

.velgrina-atc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 12px;
    background: var(--velgrina-teal);
    color: #fff;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
}

.velgrina-atc-btn:hover {
    background: var(--velgrina-teal-hover);
}

.velgrina-atc-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   CATEGORY / COLLECTION CARDS
   ========================================================================== */
.velgrina-cat-card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    cursor: pointer;
}

.velgrina-cat-card a {
    display: block;
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.velgrina-cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.velgrina-cat-card:hover img {
    transform: scale(1.1);
}

.velgrina-cat-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 100%
    );
    pointer-events: none;
    transition: background 0.3s;
}

.velgrina-cat-card:hover .velgrina-cat-card__overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.25) 50%,
        transparent 100%
    );
}

.velgrina-cat-card__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    z-index: 2;
    transition: transform 0.3s;
}

.velgrina-cat-card:hover .velgrina-cat-card__title {
    transform: translateY(-4px);
}

@media (min-width: 768px) {
    .velgrina-cat-card__title {
        font-size: 1.125rem;
        padding: 20px 16px;
    }
}

/* ==========================================================================
   LIFESTYLE SECTION
   ========================================================================== */
.velgrina-lifestyle-img {
    overflow: hidden;
    border-radius: 0;
}

.velgrina-lifestyle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform 0.5s ease;
}

.velgrina-lifestyle-img:hover img {
    transform: scale(1.03);
}

@media (min-width: 768px) {
    .velgrina-lifestyle-img img {
        aspect-ratio: auto;
        min-height: 360px;
        max-height: 480px;
    }
}

/* ==========================================================================
   SOCIAL / INSTAGRAM SECTION
   ========================================================================== */
/* Social section uses mostly Tailwind utility classes.
   Only the hover transition on the overlay needs custom CSS
   if not handled via Tailwind group-hover classes.              */

/* No additional custom classes needed — template uses Tailwind utilities
   and group-hover pattern. This block is a placeholder for any future
   social-specific styles. */

/* ==========================================================================
   TRUST BAR
   ========================================================================== */
/* Trust bar is built entirely with Tailwind utilities in the template.
   The custom color utilities (text-velgrina-teal, bg-velgrina-light,
   border-velgrina-border, text-velgrina-black, text-velgrina-gray)
   are defined in Tailwind config.

   Below are fallback styles in case Tailwind purges them. */

/* Color utilities used across all sections — fallback definitions */
.text-velgrina-teal {
    color: var(--velgrina-teal);
}

.text-velgrina-black {
    color: var(--velgrina-black);
}

.text-velgrina-gray {
    color: var(--velgrina-gray);
}

.bg-velgrina-light {
    background-color: var(--velgrina-light);
}

.bg-velgrina-teal {
    background-color: var(--velgrina-teal);
}

.border-velgrina-border {
    border-color: var(--velgrina-border);
}

.hover\:bg-velgrina-teal-hover:hover {
    background-color: var(--velgrina-teal-hover);
}
