/* ==========================================================================
   Single Product / Dish Page Styles
   ========================================================================== */

/* ---------- Breadcrumb ---------- */

.product-breadcrumb {
    padding: var(--space-sm) 0 0;
    background-color: #F8F6EF;
}

.product-breadcrumb .breadcrumbs {
    flex-wrap: nowrap;
    min-width: 0;
}

.product-breadcrumb .breadcrumbs .current {
    color: var(--color-primary);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-breadcrumb .breadcrumbs > a,
.product-breadcrumb .breadcrumbs > .separator {
    flex-shrink: 0;
}

/* ---------- Page Layout ---------- */

.product-page {
    padding: 24px 0 80px;
}

/* ---------- Hero ---------- */

.product-hero {
    display: flex;
    align-items: stretch;
    gap: 40px;
    margin-bottom: 80px;
}

.product-hero-image {
    flex: 0 0 520px;
    background-color: #fff;
    border-radius: 32px;
    padding: 24px;
    box-shadow: var(--shadow-card-soft);
}

.product-hero-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

.product-hero-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.product-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text-dark);
    margin: 0;
}

.product-info-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

/* ---------- Volume pill ---------- */

.product-volume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-dark);
    background: #fff;
    padding: 11px 16px 11px 11px;
    border: 1px solid #dfdfdf;
    border-radius: var(--radius-pill);
    cursor: default;
}

.product-volume svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-text-dark);
}

.product-volume-value {
    font-weight: 300;
}

.product-description {
    font-size: 14px;
    font-weight: 300;
    color: var(--color-text-gray);
    line-height: 1.6;
    margin: 0;
}

/* ---------- Buy card ---------- */

.product-buy-card {
    background: #fff;
    border-radius: 24px;
    padding: 24px 32px;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: var(--shadow-card-soft);
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex-shrink: 0;
}

.product-price-current {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text-dark);
    line-height: 1.1;
}

.product-price-old {
    font-size: 14px;
    font-weight: 300;
    color: #5b5b5b;
    text-decoration: line-through;
}

.product-qty.quantity-control {
    flex-shrink: 0;
    border: 1px solid #e5e5e5;
    border-radius: var(--radius-pill);
    background: #f7f7f7;
    overflow: hidden;
}

.product-qty.quantity-control button {
    width: 48px;
    height: 48px;
    color: var(--color-text-dark);
    background: transparent;
}

.product-qty.quantity-control button:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.product-qty.quantity-control input {
    width: 40px;
    height: 48px;
    background: transparent;
    font-size: 18px;
    font-weight: 500;
}

.product-buy {
    flex: 1 1 auto;
    min-height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    padding: 0 32px;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.product-buy:hover {
    filter: brightness(1.08);
}

.product-buy.adding {
    opacity: 0.6;
    pointer-events: none;
}

.product-buy svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ---------- Related products ---------- */

.product-related {
    margin-top: 40px;
    overflow: visible;
}

.product-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.product-related-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0;
}

.product-related-arrows {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.product-related-arrow {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text-dark);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.product-related-arrow:hover {
    background-color: #fff;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.product-related-arrow:disabled {
    opacity: 0.4;
    cursor: default;
}

.product-related-arrow svg {
    width: 16px;
    height: 16px;
}

/* ---------- Carousel track (CSS scroll-snap) ---------- */

.product-related-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 60px) / 4);
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Vertical padding gives the card shadow room top/bottom.
       Horizontal bleed kept off — `overflow-x: auto` would clip it anyway. */
    padding: 16px 0 40px;
}

.product-related-track::-webkit-scrollbar {
    display: none;
}

.product-related-card {
    scroll-snap-align: start;
}

/* ==========================================================================
   Responsive — Tablet (max-width: 1100px)
   ========================================================================== */

@media (max-width: 1100px) {
    .product-page {
        padding: 16px 0 60px;
    }

    .product-hero {
        gap: 24px;
        margin-bottom: 60px;
    }

    .product-hero-image {
        flex: 0 0 380px;
        padding: 16px;
        border-radius: 24px;
    }

    .product-hero-info {
        gap: 24px;
    }

    .product-title {
        font-size: 32px;
    }

    .product-buy-card {
        padding: 20px;
        gap: 16px;
    }

    .product-price-current {
        font-size: 26px;
    }

    .product-qty.quantity-control button {
        width: 40px;
        height: 44px;
    }

    .product-qty.quantity-control input {
        width: 32px;
        height: 44px;
    }

    .product-buy {
        flex: 1 1 0;
        min-width: 0;
        min-height: 56px;
        font-size: 15px;
        padding: 0 16px;
        gap: 8px;
    }

    .product-buy svg {
        width: 20px;
        height: 20px;
    }

    .product-related-track {
        grid-auto-columns: calc((100% - 40px) / 3);
        padding: 12px 0 32px;
    }

    .product-related-title {
        font-size: 28px;
    }
}

/* ==========================================================================
   Responsive — Mobile (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    .product-page {
        padding: 8px 0 40px;
    }

    .product-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        margin-bottom: 40px;
    }

    .product-hero-image {
        flex: 0 0 auto;
        align-self: center;
        width: 100%;
        max-width: 420px;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 24px;
    }

    .product-hero-image img {
        border-radius: 24px;
    }

    .product-hero-info {
        gap: 20px;
    }

    .product-title {
        font-size: 28px;
        line-height: 1.25;
        text-align: center;
    }

    .product-info-body {
        align-items: center;
        text-align: center;
    }

    .product-description {
        text-align: center;
    }

    .product-buy-card {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 12px;
        padding: 20px;
        border-radius: 20px;
    }

    .product-price {
        grid-column: 1 / -1;
        align-items: center;
        justify-self: center;
    }

    .product-price-current {
        font-size: 28px;
    }

    .product-qty.quantity-control {
        flex: 0 0 auto;
        justify-self: start;
    }

    .product-qty.quantity-control button {
        width: 44px;
        height: 44px;
    }

    .product-qty.quantity-control input {
        width: 36px;
        height: 44px;
    }

    .product-buy {
        flex: 1 1 0;
        min-width: 0;
        min-height: 56px;
        font-size: 16px;
        padding: 0 16px;
        gap: 8px;
    }

    .product-buy svg {
        width: 20px;
        height: 20px;
    }

    .product-related {
        margin-top: 20px;
    }

    .product-related-header {
        margin-bottom: 20px;
        gap: 12px;
    }

    .product-related-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .product-related-arrow {
        width: 44px;
        height: 44px;
    }

    .product-related-track {
        grid-auto-columns: calc((100% - 12px) / 2);
        gap: 12px;
        padding: 12px 0 32px;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 24px;
    }

    .product-related-title {
        font-size: 20px;
    }
}
