/* Shared product card */
.product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 22px;
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(204,196,184,.76);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(23,26,24,.06);
    transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.product-card:hover {
    transform: translateY(-7px);
    border-color: rgba(168,151,128,.62);
    box-shadow: 0 22px 48px rgba(23,26,24,.13);
}

.product-image-wrap {
    position: relative;
    display: block;
    aspect-ratio: 4 / 4.7;
    overflow: hidden;
    background: var(--surface-alt);
}

.product-image-wrap > picture { display: block; width: 100%; height: 100%; }

.product-image-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(0deg, rgba(7,29,25,.42), transparent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}

.product-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 4.7;
    object-fit: cover;
    transition: transform 450ms cubic-bezier(.2,.7,.2,1);
}

.product-card:hover .product-image { transform: scale(1.055); }
.product-card:hover .product-image-wrap::after { opacity: 1; }

.corner-label {
    z-index: 2;
    inset-block-start: 14px;
    inset-inline-start: 14px;
    inset-inline-end: auto;
    padding: 7px 11px;
    border-radius: 999px;
    color: #fff;
    background: var(--accent-dark);
    box-shadow: 0 5px 14px rgba(87,55,31,.18);
    font-size: 11px;
}

html[dir="ltr"] .corner-label {
    right: auto;
    left: 14px;
}

.product-stock {
    position: absolute;
    z-index: 2;
    inset-block-start: 14px;
    inset-inline-end: 14px;
    box-shadow: 0 5px 16px rgba(23,26,24,.12);
}

.product-view-cue {
    position: absolute;
    z-index: 2;
    inset-inline: 16px;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 250ms ease, transform 250ms ease;
}

.product-view-cue span { font-size: 12px; font-weight: 700; }
.product-view-cue b {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(7px);
    font-size: 17px;
}

.ui-arrow-ne {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.product-card:focus-within .product-image-wrap::after { opacity: 1; }
.product-card:focus-within .product-view-cue { opacity: 1; transform: translateY(0); }

.product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

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

.product-category {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-code {
    flex: 0 0 auto;
    color: #939791;
    font-size: 10px;
    letter-spacing: .04em;
}

.product-card h3 {
    min-height: 50px;
    margin: 0 0 16px;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card h3 a { transition: color 180ms ease; }
.product-card h3 a:hover { color: var(--accent-dark); }

.product-card-footer {
    min-height: 48px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(221,215,206,.76);
}

.product-card-footer .product-meta {
    min-width: 0;
    min-height: 42px;
    margin: 0;
    display: flex;
    align-items: center;
    align-self: center;
}

.product-price {
    color: var(--primary);
    font-size: 16px;
    line-height: 1.25;
    white-space: nowrap;
}

.product-price-contact { font-size: 13px; }
.product-price-unit { margin-inline-start: 5px; color: var(--text-secondary); font-size: 10px; font-weight: 700; white-space: nowrap; }
.product-card .pill { padding: 5px 9px; font-size: 11px; }
.product-card .stock-available { color: #1c6242; background: #e7f3ec; }
.product-card .stock-limited { color: #825221; background: #fff1dc; }
.product-card .stock-out { color: #8d302d; background: #fae8e7; }

.product-cart-btn {
    min-width: 112px;
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 12px;
    gap: 7px;
    font-size: 11px;
    white-space: nowrap;
}

.product-cart-btn span {
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
}

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

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

@media (max-width: 640px) {
    .product-grid { gap: 16px; }
    .product-card-body { padding: 16px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .product-card {
        width: 100%;
        max-width: 420px;
        margin-inline: auto;
    }
}

@media (hover: none) {
    .product-image-wrap::after { opacity: .82; }
    .product-view-cue { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-image,
    .product-image-wrap::after,
    .product-view-cue { transition-duration: .01ms !important; }
}
