/* =========================================
   PRODUCT DETAIL PAGE
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #ffffff;
    color: #18181b;
    font-family: "Inter", sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}


/* =========================================
   MAIN PAGE LAYOUT
========================================= */

.pdp {
    width: min(1400px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.pdp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 4rem;
    align-items: start;
}


/* =========================================
   PRODUCT GALLERY
========================================= */

.pdp-gallery {
    min-width: 0;
}

.pdp-image-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 620px;
    padding: 3rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 1.5rem;
    background: #f8f6fb;
}

.pdp-image-stage picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.pdp-image-stage img {
    width: 100%;
    max-width: 560px;
    max-height: 560px;
    object-fit: contain;
}

.pdp-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #18181b;
    font-size: 2rem;
    line-height: 1;
    transform: translateY(-50%);
    transition:
        transform 150ms ease,
        background 150ms ease;
}

.pdp-nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.05);
}

.pdp-nav.left {
    left: 1.25rem;
}

.pdp-nav.right {
    right: 1.25rem;
}

.pdp-image-counter {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(24, 24, 27, 0.8);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
}


/* =========================================
   DESCRIPTION
========================================= */

.pdp-desc-panel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 1.25rem;
    background: #ffffff;
}

.pdp-desc-panel h3 {
    margin: 0 0 0.8rem;
    font-size: 1.1rem;
}

.desc-text {
    margin: 0;
    color: #52525b;
    font-size: 0.96rem;
    line-height: 1.75;
}

.desc-toggle {
    margin-top: 0.8rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #c026d3;
    font-size: 0.9rem;
    font-weight: 700;
}


/* =========================================
   THUMBNAILS
========================================= */

.pdp-swatch-thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pdp-swatch-thumbs button {
    width: 76px;
    height: 76px;
    padding: 0.35rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 0.8rem;
    background: #ffffff;
}

.pdp-swatch-thumbs button:hover {
    border-color: #c026d3;
}


/* =========================================
   PRODUCT INFORMATION
========================================= */

.pdp-info {
    position: sticky;
    top: 2rem;
    min-width: 0;
}

.pdp-title {
    margin: 0;
    color: #18181b;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.pdp-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.pdp-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.price-now {
    font-size: 1.75rem;
    font-weight: 800;
    color: black;
}

.pdp-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #52525b;
    font-size: 0.9rem;
}

.pdp-reviews {
    color: #71717a;
}


/* =========================================
   BUY BOX
========================================= */

.pdp-buybox-premium {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e4e4e7;
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(24, 24, 27, 0.08);
}

.pdp-atc {
    width: 100%;
}

.pdp-atc button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 0.9rem;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease;
}

.pdp-atc button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(192, 38, 211, 0.25);
}

.ship-note {
    margin-top: 0.9rem;
    color: #52525b;
    text-align: center;
    font-size: 0.85rem;
}

.trust-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin-top: 1rem;
}

.trust-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.55rem;
    border-radius: 0.7rem;
    background: #f4f4f5;
    color: #52525b;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
}


/* =========================================
   DISCOUNT CODE
========================================= */

.discount-code-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.discount-label {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.discount-input-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
}

.discount-input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 0.9rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.7rem;
    outline: none;
}

.discount-input:focus {
    border-color: #c026d3;
    box-shadow: 0 0 0 3px rgba(192, 38, 211, 0.12);
}

.discount-submit-btn {
    min-height: 44px;
    padding: 0 1rem;
    border: 0;
    border-radius: 0.7rem;
    background: #18181b;
    color: #ffffff;
    font-weight: 700;
}


/* =========================================
   COLORS
========================================= */

.available-colors {
    margin-top: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.colors-label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 800;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
}

.color-options button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 4px;
    border: 1px solid #d4d4d8;
    border-radius: 50%;
    background: #ffffff;
}

.color-options button:hover {
    border-color: #18181b;
}

.color-swatch {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #d4d4d8;
}

.color-option.display-only {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-names {
    color: #52525b;
    font-size: 0.9rem;
}


/* =========================================
   PRODUCT DETAILS
========================================= */

.pdp-details-premium {
    margin-top: 1.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-section {
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fafafa;
}

.detail-section + .detail-section {
    margin-top: 1rem;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.9rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.checklist {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #52525b;
    font-size: 0.9rem;
    line-height: 1.45;
}


/* =========================================
   RELATED PRODUCTS
========================================= */

.related-products {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

.related-products h2 {
    margin: 0 0 1.5rem;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.related-grid > div {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #ffffff;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease;
}

.related-grid > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(24, 24, 27, 0.1);
}

.product-image {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4f1f8;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-image {
    width: 64px;
    color: #a1a1aa;
}

.product-info {
    padding: 1rem;
}

.product-category {
    color: #a21caf;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.product-title {
    margin: 0.45rem 0 0.8rem;
    font-size: 1rem;
    line-height: 1.35;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-price {
    font-weight: 800;
}

.product-buttons {
    margin-top: 1rem;
}

.product-buttons button {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 0.7rem;
    background: #18181b;
    color: #ffffff;
    font-weight: 700;
}


/* =========================================
   FLASH / TOASTS
========================================= */

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: grid;
    gap: 0.75rem;
    width: min(360px, calc(100% - 2rem));
}


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

@media (max-width: 1050px) {
    .pdp-hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .pdp-info {
        position: static;
    }

    .pdp-image-stage {
        min-height: 520px;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .pdp {
        width: min(100% - 1.5rem, 1400px);
        padding-top: 1.25rem;
    }

    .pdp-image-stage {
        min-height: 390px;
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .pdp-nav {
        width: 40px;
        height: 40px;
    }

    .pdp-nav.left {
        left: 0.65rem;
    }

    .pdp-nav.right {
        right: 0.65rem;
    }

    .pdp-title {
        font-size: 1.5rem;
    }

    .pdp-price-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .trust-chips {
        grid-template-columns: 1fr;
    }

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

    .discount-input-group {
        grid-template-columns: 1fr;
    }

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