/* =========================================
   RESET & BASE
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: #111;
    overflow-x: hidden;
}

input,
select,
textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
}


/* =========================================
   LAYOUT
========================================= */

.product-page {
    max-width: 1400px;
    margin: auto;
    padding: 40px 20px;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}


/* =========================================
   BREADCRUMBS
========================================= */

.breadcrumbs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    color: #777;
    font-size: 14px;
}

.breadcrumbs a {
    color: #777;
    text-decoration: none;
}


/* =========================================
   GALLERY
========================================= */

.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    background: #f7f7f7;
    border-radius: 24px;
    padding: 40px;
}

.main-image img {
    width: 100%;
}

.thumbnail-gallery {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.thumb {
    width: 90px;
    height: 90px;
    border: none;
    background: #f4f4f4;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================
   PRODUCT INFO
========================================= */

.product-info h1 {
    font-size: 48px;
    line-height: 1.1;
}

.product-subtitle {
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.7;
    color: #666;
}

.reviews-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 25px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.price {
    font-size: 42px;
    font-weight: 800;
}

.stock {
    color: green;
    font-weight: 700;
}


/* =========================================
   CONFIGURATOR
========================================= */

.product-configurator {
    margin-top: 35px;
}

.option-group {
    margin-top: 28px;
}

.option-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Colour Builder Cards */

.colour-builder-card {
    border: 1px solid #e5e5e5;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 24px;
}

.builder-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.colour-select {
    width: 220px;
    height: 54px;
    border-radius: 14px;
    border: 1px solid #ddd;
    padding: 0 16px;
    font-size: 16px;
}

.remove-colour {
    border: none;
    background: #f5f5f5;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
}

.builder-header {
    width: 100%;
    border: none;
    background: #fff;
    padding: 22px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.builder-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.builder-colour-name {
    font-size: 18px;
    font-weight: 700;
}

.builder-summary {
    font-size: 14px;
    color: #666;
}

.builder-toggle {
    font-size: 32px;
    font-weight: 300;
}

.builder-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 24px;
}

.builder-content.open {
    max-height: 800px;
    padding: 0 24px 24px;
}

/* Add Colour Button */

#add-colour-btn {
    width: 100%;
    height: 60px;
    border: 2px dashed #ccc;
    border-radius: 18px;
    background: #fafafa;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 35px;
    transition: 0.25s ease;
}

#add-colour-btn:hover {
    border-color: #111;
    background: #fff;
}

/* Size Grid */

.size-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.size-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #eee;
    padding: 16px;
    border-radius: 14px;
}

.size-row span {
    font-weight: 700;
}

.size-row input {
    width: 80px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #ddd;
    padding-left: 12px;
}

/* Design Placement */

.design-placement {
    margin-top: 40px;
}

.placement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.placement-card {
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 22px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    transition: 0.25s ease;
}

.placement-card.active {
    border: 2px solid #111;
    background: #fafafa;
}

.placement-icon {
    font-size: 24px;
}


/* =========================================
   LIVE PRICING
========================================= */

.live-pricing {
    margin-top: 35px;
    background: #f8f8f8;
    border-radius: 22px;
    padding: 28px;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 16px;
}

.pricing-row.total {
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 24px;
    font-weight: 800;
}


/* =========================================
   CTA BUTTONS
========================================= */

.cta-wrapper {
    margin-top: 35px;
}

.primary-cta {
    width: 100%;
    height: 64px;
    border: none;
    border-radius: 16px;
    background: #000;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.add-to-cart-btn {
    width: 100%;
    height: 64px;
    margin-top: 14px;
    border: none;
    border-radius: 16px;
    background: #111;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.25s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    background: #000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.secondary-cta {
    width: 100%;
    height: 56px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #111;
    margin-top: 12px;
    cursor: pointer;
}

.delivery-row {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 14px;
}


/* =========================================
   ACCORDIONS
========================================= */

.product-accordions {
    margin-top: 80px;
}

details {
    border: 1px solid #eee;
    border-radius: 18px;
    margin-bottom: 20px;
    overflow: hidden;
}

summary {
    padding: 24px;
    cursor: pointer;
    font-weight: 700;
    font-size: 20px;
}

.accordion-content {
    padding: 0 24px 24px;
}


/* =========================================
   RESPONSIVE — TABLET
========================================= */

@media (max-width: 992px) {

    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .product-info h1 {
        font-size: 36px;
    }

    .price {
        font-size: 34px;
    }

}


/* =========================================
   RESPONSIVE — MOBILE
========================================= */

@media (max-width: 768px) {

    .product-page {
       padding: 16px 16px 140px;
    }

    .product-subtitle {
        font-size: 16px;
        line-height: 1.6;
    }

    .main-image {
        padding: 20px;
        border-radius: 22px;
    }

    .size-grid {
        grid-template-columns: 1fr;
    }

    .placement-grid {
        grid-template-columns: 1fr;
    }

    .placement-card {
        padding: 18px;
    }

    .colour-select {
        width: 100%;
    }

    .remove-colour {
        width: 100%;
        height: 50px;
    }

    .live-pricing {
        padding: 22px;
        border-radius: 20px;
    }

    .pricing-row {
        font-size: 15px;
    }

    .pricing-row.total {
        font-size: 24px;
    }

}


/* =========================================
   RESPONSIVE — SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .product-info h1 {
        font-size: 26px;
    }

    .price {
        font-size: 28px;
    }

    .main-image {
        padding: 14px;
    }

    .pricing-row.total {
        font-size: 22px;
    }

}


/* =========================================
   SAFE AREA (NOTCHED DEVICES)
========================================= */

@supports (padding: max(0px)) {

    .product-page {
        padding-bottom: max(140px, env(safe-area-inset-bottom));
    }

}