/* =========================================================
   CARDS DE PRODUCTOS
   TIENDA GALINDEZ
   ========================================================= */

/* =========================================================
   CONTENEDOR
   ========================================================= */

.container-cards {
    display: grid;

    grid-template-columns: repeat(6, minmax(0, 1fr));

    gap: 12px;

    align-items: stretch;

    width: 100%;

    padding: 20px 0;

    box-sizing: border-box;

    background-color: var(--color-background);
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */

.product-card {
    width: 100%;

    max-width: 230px;

    min-width: 180px;

    margin: 0 auto;

    box-sizing: border-box;

    background-color: var(--color-surface);

    border: 1px solid var(--color-brand-tan);

    border-radius: 12px;

    overflow: hidden;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

/* =========================================================
   HOVER
   ========================================================= */

.product-card:hover {
    transform: translateY(-6px);

    border-color: var(--color-brand-tan);

    box-shadow: 0 12px 25px rgba(49, 27, 20, 0.15);
}

/* =========================================================
   IMAGEN
   ========================================================= */

.product-card .product-card-img {
    width: 100%;

    height: 120px;

    object-fit: cover;

    display: block;

    transition: transform 0.3s ease;
}

/* Zoom de imagen */

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

/* =========================================================
   BODY
   ========================================================= */

.product-card .product-card-body {
    padding: 10px;
}

.product-promotion-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background-color: #b42318;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* =========================================================
   TITULO
   ========================================================= */

.product-card .product-card-title {
    margin-bottom: 5px;

    color: #222;

    font-size: 1rem;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

/* =========================================================
   DESCRIPCIÓN
   ========================================================= */

.product-card .product-card-text {
    margin-bottom: 0;

    color: #666;

    font-size: 0.875rem;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;
}

/* =========================================================
   INFORMACIÓN DEL PRODUCTO
   ========================================================= */

.product-card .product-list {
    margin: 0;

    border-top: 1px solid var(--color-border-light);
}

.product-card .product-list-item {
    padding: 7px 10px;

    color: #555;

    font-size: 0.8rem;

    background-color: var(--color-surface);

    border-color: var(--color-border-light);
}

/* Precio */

.product-card .product-price {
    color: var(--color-brand-dark);

    font-weight: 700;
}

/* =========================================================
   BOTONES
   ========================================================= */

.product-card .product-actions {
    display: flex;

    gap: 8px;

    padding: 10px;
}

/* =========================================================
   LINK DETALLES
   ========================================================= */

.product-card .btn-secondary-action {
    flex: 1;

    text-decoration: none;

    text-align: center;
}

/* =========================================================
   AGREGAR AL CARRITO
   ========================================================= */

.product-card .btn-primary-action {
    flex: 1;
}

/* =========================================================
   ANIMACIÓN BOTÓN CARRITO
   ========================================================= */

.product-card .add-to-cart-btn {
    position: relative;

    overflow: hidden;

    transition:
        transform 0.1s ease,
        box-shadow 0.2s ease;
}

.product-card .add-to-cart-btn:active {
    transform: scale(0.95);

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   ESTADO AGREGADO
   ========================================================= */

.product-card .added {
    background-color: var(--color-success-cart) !important;

    color: var(--color-surface);
}

/* =========================================================
   TABLAS
   ========================================================= */

.thead-dark th {
    background-color: var(--color-brand-dark) !important;

    color: var(--color-brand-tan) !important;
}

/* =========================================================
   UTILIDADES
   ========================================================= */

.text-gradient {
    color: var(--color-brand-accent);

    font-weight: bold;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* 5 columnas */

@media (max-width: 1400px) {
    .container-cards {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* 4 columnas */

@media (max-width: 1200px) {
    .container-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* 3 columnas */

@media (max-width: 992px) {
    .container-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 2 columnas */

@media (max-width: 768px) {
    .container-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   MÓVILES
   ========================================================= */

@media (max-width: 480px) {
    .container-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 8px;

        padding: 10px 8px;
    }

    .container-cards .product-card {
        width: 100%;

        max-width: none;

        min-width: 0;

        margin: 0;
    }

    .product-card .product-card-img {
        height: 100px;
    }

    .product-card .product-card-body {
        padding: 8px;
    }

    .product-card .product-card-title {
        font-size: 0.85rem;
    }

    .product-card .product-card-text {
        font-size: 0.75rem;
    }

    .product-card .product-list-item {
        padding: 6px 8px;

        font-size: 0.75rem;
    }

    .product-card .product-actions {
        flex-direction: column;

        gap: 5px;

        padding: 8px;
    }

    .product-card .btn-primary-action,
    .product-card .btn-secondary-action {
        width: 100%;

        font-size: 0.75rem;

        padding: 6px 4px;

        text-align: center;
    }
}
