/* NailoLab — Product Detail Page Styles */

/* Design tokens (shared with landing pages) */
:root {
    --nl-primary: #bf8e97;
    --nl-secondary: #5a4e4f;
    --nl-dark: #3a2f2f;
    --nl-light: #f6f0ef;
    --nl-body-text: #727272;
    --nl-heading: #0c0c0c;
    --nl-white: #ffffff;
    --nl-font-heading: 'Syne', system-ui, sans-serif;
    --nl-font-body: 'Didact Gothic', system-ui, sans-serif;
    --nl-radius: 8px;
    --nl-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --nl-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.14);
    --nl-transition: 0.25s ease;
}

/* ==========================================================================
   Product Detail — Main Two-Column Layout
   ========================================================================== */

.product-detail {
    padding: 60px 0 80px;
    background-color: var(--nl-white);

    & .product-detail__columns {
        display: flex;
        gap: 48px;
        align-items: flex-start;
    }
}

/* Image column — 60% */
.product-detail__image-column {
    flex: 0 0 58%;
    overflow: hidden;

    & .product-detail__main-image {
        width: 100%;
        height: auto;
        border-radius: var(--nl-radius);
        box-shadow: var(--nl-shadow);
        display: block;
        object-fit: cover;
    }
}

/* Info column — 40% */
.product-detail__info-column {
    flex: 1 1 auto;
    padding: 8px 0;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.product-detail__breadcrumb {
    font-size: 0.8125rem;
    color: var(--nl-body-text);
    margin-bottom: 16px;
    line-height: 1.5;

    & a {
        color: var(--nl-primary);
        text-decoration: none;

        &:hover,
        &:focus {
            text-decoration: underline;
            outline: 2px solid var(--nl-primary);
            outline-offset: 2px;
            border-radius: 2px;
        }
    }

    & span {
        color: var(--nl-body-text);
    }
}

/* ==========================================================================
   Category Badge
   ========================================================================== */

.product-detail__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--nl-primary);
    margin-bottom: 10px;
}

/* ==========================================================================
   Product Name
   ========================================================================== */

.product-detail__name {
    font-family: var(--nl-font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--nl-dark);
    line-height: 1.2;
    margin-bottom: 16px;
}

/* ==========================================================================
   Product Detail Accordions
   ========================================================================== */

.product-detail__accordions {
    margin-bottom: 20px;
}

.product-detail__accordion {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.product-detail__accordion-title {
    font-family: var(--nl-font-heading);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--nl-dark);
    padding: 14px 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;

    &::-webkit-details-marker {
        display: none;
    }

    &::after {
        content: '+';
        font-size: 1.125rem;
        font-weight: 400;
        color: var(--nl-primary);
        transition: transform var(--nl-transition);
    }

    details[open] > &::after {
        content: '\2212';
    }
}

.product-detail__accordion-content {
    padding: 0 0 16px;
    font-family: var(--nl-font-body);
    font-size: 0.9375rem;
    color: var(--nl-body-text);
    line-height: 1.7;
}

/* ==========================================================================
   Variant Swatches — detail page container
   ========================================================================== */

.variant-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}

.variant-swatches__overflow-text {
    font-size: 0.8125rem;
    color: var(--nl-secondary);
    font-style: italic;
    margin: 0;
    width: 100%;
}

.variant-swatches__more-box {
    width: 64px;
    height: 64px;
    border-radius: var(--nl-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nl-light);
    border: 1px solid rgba(58, 47, 47, 0.15);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.variant-swatches__more-box:hover {
    background: var(--nl-light);
    border: 1px solid var(--nl-primary);
    color: inherit;
}

.variant-swatch__more-text {
    font-family: var(--nl-font-body, 'Didact Gothic', sans-serif);
    font-size: 0.85rem;
    color: var(--nl-secondary);
}

.variant-swatches__view-colors {
    font-family: var(--nl-font-body, 'Didact Gothic', sans-serif);
    font-size: 0.85rem;
    color: var(--nl-primary);
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.variant-swatches__view-colors:hover,
.variant-swatch:hover {
    background: transparent !important;
    color: inherit !important;
    border: none !important;
}

/* ==========================================================================
   Price / Contact
   ========================================================================== */

.product-detail__price-contact {
    font-size: 0.9375rem;
    color: var(--nl-secondary);
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.product-detail__cta {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--nl-primary);
    color: var(--nl-white);
    font-family: var(--nl-font-heading);
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    border-radius: var(--nl-radius);
    transition: background-color var(--nl-transition), transform var(--nl-transition), box-shadow var(--nl-transition);
    letter-spacing: 0.04em;

    &:hover,
    &:focus {
        background-color: var(--nl-secondary);
        transform: translateY(-2px);
        box-shadow: var(--nl-shadow-hover);
        outline: none;
        color: var(--nl-white);
    }

    &:active {
        transform: translateY(0);
    }
}

/* ==========================================================================
   Related Products Section
   ========================================================================== */

.related-products {
    padding: 60px 0 80px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: var(--nl-light);
}

.related-products__heading {
    font-family: var(--nl-font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--nl-dark);
    margin-bottom: 36px;
}

/* Related products grid — 4 cols desktop */
.related-products__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Related product card */
.related-product-card {
    display: block;
    background-color: var(--nl-white);
    border-radius: var(--nl-radius);
    box-shadow: var(--nl-shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border-bottom: 3px solid transparent;
    transition: transform var(--nl-transition), box-shadow var(--nl-transition), border-color var(--nl-transition);

    &:hover,
    &:focus {
        transform: translateY(-2px);
        box-shadow: var(--nl-shadow-hover);
        border-bottom-color: var(--nl-primary);
        outline: none;
    }

    &:focus-visible {
        outline: 2px solid var(--nl-primary);
        outline-offset: 2px;
    }
}

.related-product-card__image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.related-product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--nl-transition);

    .related-product-card:hover & {
        transform: scale(1.04);
    }
}

.related-product-card__body {
    padding: 16px;
}

.related-product-card__name {
    font-family: var(--nl-font-heading);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--nl-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.related-product-card__variant-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nl-primary);
    background-color: rgba(191, 142, 151, 0.1);
    padding: 2px 8px;
    border-radius: 999px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet: 2 related columns, stack hero */
@media (max-width: 992px) {
    .related-products__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: full stack */
@media (max-width: 768px) {
    .product-detail {
        padding: 40px 0 60px;

        & .product-detail__columns {
            flex-direction: column;
            gap: 32px;
        }
    }

    .product-detail__image-column {
        flex: 0 0 100%;
        width: 100%;
    }

    .product-detail__info-column {
        flex: 0 0 100%;
        width: 100%;
    }

    .related-products__grid {
        grid-template-columns: 1fr;
    }

    .variant-swatch {
        width: 52px;
        height: 52px;
    }
}
