.product-grid-section,
.smart-home-section {
    padding: 80px 0 92px;
}

.smart-home-section {
    border-top: 1px solid var(--border);
    background:
        linear-gradient(
            180deg,
            rgba(251, 245, 238, 0.78),
            rgba(249, 242, 233, 0.38)
        );
}

.smart-home-section-personalized {
    background:
        radial-gradient(
            circle at 88% 10%,
            rgba(195, 161, 106, 0.15),
            transparent 25rem
        ),
        var(--surface);
}

.product-grid-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.product-grid-heading h2 {
    margin-bottom: 7px;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.product-grid-heading p {
    max-width: 660px;
    margin-bottom: 0;
}

.product-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 20px;
}


/* ============================================================
   Product Card
============================================================ */

.product-card {
    position: relative;
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 10px 28px rgba(49, 47, 19, 0.055);
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.product-card:hover {
    border-color: rgba(195, 161, 106, 0.58);
    transform: translateY(-5px);
    box-shadow:
        0 20px 52px rgba(49, 47, 19, 0.10);
}

.product-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 0.93;
    background:
        linear-gradient(
            145deg,
            #F1E7D8,
            var(--surface)
        );
}

.product-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 420ms ease;
}

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

.product-card-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    align-content: center;
    gap: 9px;
    color: var(--primary);
}

.product-card-placeholder strong {
    font-family: "Playfair Display", serif;
    font-size: 5.2rem;
    font-weight: 500;
}

.product-card-placeholder small {
    color: var(--text-secondary);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}


/* Unified Badges */

.product-badge-stack {
    position: absolute;
    z-index: 3;
    top: 13px;
    left: 13px;
    display: flex;
    max-width: calc(100% - 72px);
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.veloura-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    box-shadow:
        0 5px 16px rgba(49, 47, 19, 0.10);
    backdrop-filter: blur(8px);
}

.badge-recommended {
    color: var(--white);
    background: rgba(97, 96, 61, 0.94);
}

.badge-sale {
    color: var(--primary-dark);
    background: rgba(229, 197, 142, 0.96);
}

.badge-best-seller {
    color: #5B421A;
    background: rgba(245, 221, 174, 0.96);
}

.badge-new {
    color: #42523A;
    background: rgba(220, 231, 208, 0.96);
}

.badge-low-stock {
    color: #7B4F1C;
    background: rgba(248, 222, 184, 0.96);
}


/* Wishlist */

.product-wishlist-form {
    position: absolute;
    z-index: 4;
    top: 13px;
    right: 13px;
    margin: 0;
}

.product-wishlist-button {
    position: absolute;
    z-index: 4;
    top: 13px;
    right: 13px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 8px 20px rgba(49, 47, 19, 0.10);
    cursor: pointer;
    transition:
        transform var(--transition),
        color var(--transition),
        background var(--transition);
    backdrop-filter: blur(9px);
}

.product-wishlist-form
.product-wishlist-button {
    position: static;
}

.product-wishlist-button:hover {
    color: var(--secondary);
    transform: scale(1.04);
}

.product-wishlist-button.is-saved {
    color: var(--white);
    background: var(--primary);
}


/* Content */

.product-card-body {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    padding: 19px;
}

.product-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.product-card-category {
    overflow: hidden;
    color: var(--secondary);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-card-category:hover {
    color: var(--primary);
}

.product-card-stock {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    color: var(--success);
    font-size: 0.59rem;
    font-weight: 600;
}

.product-card-stock.is-out {
    color: var(--danger);
}

.stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.product-card-title {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.16;
}

.product-card-title a:hover {
    color: var(--primary);
}

.product-card-brand {
    margin: 5px 0 0;
    font-size: 0.66rem;
}

.product-card-rating {
    display: flex;
    min-height: 25px;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    color: var(--text-secondary);
    font-size: 0.64rem;
}

.product-card-rating .rating-star {
    color: var(--secondary);
    font-size: 0.88rem;
}

.product-card-rating strong {
    color: var(--text-primary);
    font-size: 0.68rem;
}

.product-card-description {
    min-height: 62px;
    margin: 10px 0 16px;
    color: var(--text-secondary);
    font-size: 0.73rem;
    line-height: 1.65;
}

.product-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.product-card-price {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.product-card-price strong {
    color: var(--primary-dark);
    font-size: 0.88rem;
}

.product-card-price del {
    color: var(--text-secondary);
    font-size: 0.64rem;
}


/* Strong differentiated cart action */

.btn-add-cart,
.btn-stock-alert {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.btn-add-cart {
    color: var(--primary-dark);
    border-color: #B99150;
    background:
        linear-gradient(
            135deg,
            #D1B079,
            var(--secondary)
        );
    box-shadow:
        0 8px 18px rgba(195, 161, 106, 0.20);
}

.btn-add-cart:hover:not(:disabled) {
    color: var(--primary-dark);
    background:
        linear-gradient(
            135deg,
            #DABB88,
            #B99253
        );
    transform: translateY(-1px);
    box-shadow:
        0 12px 24px rgba(195, 161, 106, 0.28);
}

.btn-add-cart.is-added {
    color: var(--white);
    border-color: var(--primary);
    background: var(--primary);
}

.btn-add-cart:disabled {
    opacity: 0.68;
    cursor: wait;
}

.btn-stock-alert {
    color: var(--primary);
    border-color: rgba(97, 96, 61, 0.28);
    background: var(--surface);
}

.btn-stock-alert:hover:not(:disabled) {
    color: var(--white);
    background: var(--primary);
}

.btn-stock-alert:disabled {
    opacity: 0.62;
    cursor: default;
}


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


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

    .product-grid-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


@media (max-width: 575px) {
    .product-grid-section,
    .smart-home-section {
        padding: 58px 0 68px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        max-width: 430px;
        margin-inline: auto;
    }

    .product-card-description {
        min-height: auto;
    }

    .product-card-footer {
        align-items: center;
    }
}
