
/* ===== PRODUCT PAGE ===== */
/* Header, drawer and base styles come from style.css */

.product-store-logo {
    flex: 1;
    text-align: center;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 6px;
}

.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.product-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.breadcrumb {
    display: flex;
    gap: 14px;
    padding: 22px 0;
    font-size: 14px;
    color: #444;
    flex-wrap: wrap;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

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

.product-gallery {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

/* Main image container */

.main-image {
    order: 2;
    width: 100%;
    height: 650px;
    min-width: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Main product image - no cropping */

.main-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center center;
    aspect-ratio: auto;
}

/* Thumbnail container */

.thumbnail-list {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Thumbnail button */

.thumb-btn {
    width: 74px;
    height: 96px;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.thumb-btn.active {
    border-color: #0b6b8a;
}

/* Thumbnail image */

.thumb-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
    aspect-ratio: auto;
}

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

.product-details h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
}

.product-description {
    margin: 0 0 18px;
    color: #666;
    font-size: 14px;
}

.price {
    font-size: 28px;
    font-weight: 700;
}

.tax-note {
    margin: 4px 0 26px;
    font-size: 13px;
    color: #666;
}

/* ===== SIZE OPTIONS ===== */

.size-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 15px;
}

.size-heading #size-chart-btn {
    background: none;
    border: 0;
    cursor: pointer;
    color: #0b7a8a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
}

.size-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.size-btn {
    min-width: 64px;
    height: 50px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.size-btn:hover {
    border-color: #111;
}

.size-btn.selected {
    background: #111;
    color: #fff;
    border-color: #111;
}

.size-message {
    min-height: 20px;
    margin: 10px 0 0;
    color: #d32f2f;
    font-size: 13px;
}

/* ===== QUANTITY ===== */

.quantity-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 14px 0 22px;
}

.quantity-row select {
    padding: 12px 14px;
    border: 1px solid #bbb;
    border-radius: 3px;
    font-size: 15px;
    background: #fff;
}

/* ===== PURCHASE BUTTONS ===== */

.purchase-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.add-cart-btn,
.buy-now-btn {
    flex: 1;
    padding: 16px;
    border: 0;
    border-radius: 2px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.add-cart-btn {
    background: #f03a2e;
    color: #fff;
}

.buy-now-btn {
    background: #ffd800;
    color: #111;
}

.add-cart-btn:hover {
    background: #d92f24;
}

.buy-now-btn:hover {
    background: #e6c300;
}

.wishlist-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #222;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.wishlist-btn.active {
    background: #111;
    color: #fff;
}

.action-message {
    min-height: 20px;
    margin: 12px 0 0;
    font-size: 14px;
    color: #1b7a3a;
}

/* ===== ACCORDION ===== */

.product-extra-details {
    width: 100%;
    margin-top: 24px;
    border: 1px solid #ddd;
}

.product-extra-details details {
    border-bottom: 1px solid #ddd;
}

.product-extra-details details:last-child {
    border-bottom: 0;
}

.product-extra-details summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
}

.product-extra-details summary::-webkit-details-marker {
    display: none;
}

.product-extra-details summary::after {
    content: "+";
    font-size: 20px;
}

.product-extra-details details[open] summary::after {
    content: "−";
}

.product-extra-details .details-content {
    padding: 0 15px 16px;
    color: #444;
    font-size: 13px;
    line-height: 1.7;
}

.product-extra-details .details-content h4 {
    margin: 12px 0 3px;
    font-size: 13px;
    color: #222;
}

.product-extra-details .details-content p {
    margin: 2px 0;
}

#detail-description {
    white-space: pre-line;
}

#product-details-loading {
    padding: 12px 15px;
    margin: 0;
}

#product-details-loading:empty {
    display: none;
}

/* ===== SIZE CHART MODAL ===== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.size-modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 460px;
    padding: 28px;
    border-radius: 6px;
    max-height: 90vh;
    overflow: auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: 0;
    font-size: 30px;
    cursor: pointer;
}

.size-chart-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.size-chart-table th,
.size-chart-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* ===== BUY NOW BUTTON ===== */

#buy-now {
    background: #111;
    color: #fff;
    border: 1px solid #111;
    border-radius: 3px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

#buy-now:hover {
    background: #e93229;
    border-color: #e93229;
    transform: translateY(-2px);
}

/* ===== ADD TO CART BUTTON ===== */

#add-to-cart {
    background: #e93229;
    color: #fff;
    border: 1px solid #e93229;
    border-radius: 3px;
    font-weight: 700;
}

#add-to-cart:hover {
    background: #c82019;
}

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

@media (max-width: 800px) {

    .product-store-logo {
        font-size: 18px;
        letter-spacing: 3px;
        text-align: left;
    }

    .product-page {
        padding: 0 16px 40px;
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    .main-image {
        order: 1;
        height: 480px;
    }

    .thumbnail-list {
        order: 2;
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .thumb-btn {
        flex: 0 0 64px;
        width: 64px;
        height: 85px;
    }

    .size-options {
        gap: 10px;
    }
}
/* Colour selection thumbnails */
.color-options {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 20px;
}

.color-btn {
    width: 78px;
    height: 72px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.color-btn img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 9px;
}

.color-btn:hover {
    border-color: #777;
}

.color-btn.selected {
    border: 1.5px solid #111;
    background: #f8f8f8;
}


.phone-color-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.phone-color-btn {
    width: 78px;
    height: 72px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: white;
    cursor: pointer;
    overflow: hidden;
}

.phone-color-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.phone-color-btn.selected {
    border: 1.5px solid #111;
}




/* Specifications table */
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 0 0 14px; }
.spec-grid > div { padding: 8px 0; border-bottom: 1px solid #e5e5e5; min-width: 0; }
.spec-grid dt { font-size: 12px; color: #6b6b6b; margin: 0 0 2px; }
.spec-grid dd { margin: 0; font-size: 14px; color: #111; overflow-wrap: anywhere; }
#spec-groups h4 { margin: 14px 0 4px; }
@media (max-width: 600px) { .spec-grid { grid-template-columns: 1fr; } }

/* Nordic coat colour selector: image slots can be filled per variant later. */
.phone-color-btn.color-swatch-only {
  width: 46px; height: 46px; min-width: 46px; padding: 0;
  border: 2px solid #d5d5d5; border-radius: 50%;
  box-shadow: inset 0 0 0 2px #fff; overflow: hidden;
}
.phone-color-btn.color-swatch-only.selected { border: 3px solid #111; outline: 2px solid #111; outline-offset: 2px; }
#phone-color-options { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
