﻿/* =========================================================
   LITTLE HERO STUDIOS
   MERCH PRODUCT DETAIL PAGE
========================================================= */

.merch-product-page {
    background: #ffffff;
    color: #173b55;
}


/* =========================================================
   PRODUCT DETAIL SECTION
========================================================= */

.merch-product-detail {
    padding: 2rem 0 4rem;
}


/* =========================================================
   BACK LINK
========================================================= */

.merch-product-back {
    margin-bottom: 1.5rem;
}

.merch-product-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;

    color: #173b55;
    text-decoration: none;

    font-weight: 700;
    font-size: 0.92rem;
}

.merch-product-back a:hover {
    color: #bd3640;
}


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

.merch-product-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr) minmax(340px, 0.85fr);

    gap: 3.5rem;

    align-items: start;
}


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

.merch-product-gallery {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);

    gap: 1rem;

    align-items: start;
}


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

.merch-product-thumbnails {
    display: flex;
    flex-direction: column;

    gap: 0.75rem;
}

.merch-product-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;

    padding: 0;

    border: 2px solid transparent;
    border-radius: 10px;

    background: #f7f7f7;

    overflow: hidden;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.merch-product-thumbnail:hover {
    transform: translateY(-1px);
}

.merch-product-thumbnail.is-active {
    border-color: #173b55;
}

.merch-product-thumbnail img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =========================================================
   MAIN PRODUCT IMAGE
========================================================= */
.merch-product-main-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f6f6f6;
    border-radius: 14px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.merch-product-main-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    object-fit: contain;
}


/* =========================================================
   GALLERY ARROWS
========================================================= */

.merch-product-gallery-prev,
.merch-product-gallery-next {
    position: absolute;
    top: 50%;

    transform: translateY(-50%);

    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.92);

    color: #173b55;

    box-shadow:
        0 8px 20px rgba(23, 59, 85, 0.16);

    cursor: pointer;

    z-index: 2;
}

.merch-product-gallery-prev {
    left: 14px;
}

.merch-product-gallery-next {
    right: 14px;
}

.merch-product-gallery-prev:hover,
.merch-product-gallery-next:hover {
    background: #ffffff;
}


/* =========================================================
   PRODUCT INFO
========================================================= */

.merch-product-info {
    position: sticky;
    top: 110px;
}

.merch-product-brand {
    display: inline-block;

    margin-bottom: 0.55rem;

    font-size: 0.82rem;
    font-weight: 800;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color: #6a7c86;
}

.merch-product-info h1 {
    margin: 0 0 0.7rem;

    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;

    line-height: 1.05;

    color: #173b55;
}

.merch-product-price {
    margin-bottom: 1.15rem;

    font-size: 1.2rem;
    font-weight: 800;

    color: #173b55;
}

.merch-product-description {
    margin-bottom: 1.7rem;

    color: #5f6f73;

    font-size: 1rem;
    line-height: 1.7;
}


/* =========================================================
   OPTION SECTIONS
========================================================= */

.merch-product-option-section {
    padding-top: 1.35rem;
    margin-top: 1.35rem;

    border-top: 1px solid #e7ecef;
}

.merch-product-option-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 0.85rem;

    font-size: 0.94rem;
}

.merch-product-option-heading span {
    font-weight: 800;

    color: #173b55;
}

.merch-product-option-heading strong {
    color: #6a7c86;

    font-size: 0.9rem;
}


/* =========================================================
   COLOR OPTIONS
========================================================= */

.merch-product-colors {
    display: flex;
    flex-wrap: wrap;

    gap: 0.7rem;
}

.merch-product-color {
    min-width: 86px;
    min-height: 42px;

    padding: 0.65rem 0.9rem;

    border: 1px solid #cfd8dd;
    border-radius: 8px;

    background: #ffffff;

    color: #173b55;

    font-size: 0.86rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.merch-product-color:hover {
    transform: translateY(-1px);

    border-color: #173b55;
}

.merch-product-color.is-active {
    border-color: #173b55;

    box-shadow:
        0 0 0 1px #173b55;
}


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

.merch-product-sizes {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(56px, 1fr));

    gap: 0.65rem;
}

.merch-product-size {
    min-height: 44px;

    border: 1px solid #cfd8dd;
    border-radius: 7px;

    background: #ffffff;

    color: #173b55;

    font-weight: 700;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.merch-product-size:hover:not(:disabled) {
    border-color: #173b55;
}

.merch-product-size.is-active {
    background: #173b55;

    border-color: #173b55;

    color: #ffffff;
}

.merch-product-size.is-unavailable,
.merch-product-size:disabled {
    color: #9ba8ae;

    background:
        linear-gradient(135deg,
            transparent 48%,
            #c8d0d4 49%,
            #c8d0d4 51%,
            transparent 52%),
        #f6f7f8;

    cursor: not-allowed;
}

.merch-product-size-loading {
    grid-column: 1 / -1;

    color: #6a7c86;

    font-size: 0.9rem;
}


/* =========================================================
   STOCK MESSAGE
========================================================= */

.merch-product-stock-message {
    min-height: 24px;

    margin: 0.75rem 0 0;

    color: #5f6f73;

    font-size: 0.88rem;
}


/* =========================================================
   PRODUCT ACTIONS
========================================================= */

.merch-product-actions {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) auto;

    gap: 0.8rem;

    margin-top: 1.5rem;
}

.merch-product-add-cart {
    width: 100%;

    min-height: 52px;

    margin: 0;
}

.merch-product-favorite-btn {
    min-width: 118px;
    min-height: 52px;

    padding: 0 1rem;

    border: 1px solid #cfd8dd;
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 0.55rem;

    background: #ffffff;

    color: #173b55;

    font-weight: 800;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.merch-product-favorite-btn:hover {
    border-color: #bd3640;
}

.merch-product-favorite-btn.is-favorited {
    background: #fff3f4;

    border-color: #bd3640;

    color: #bd3640;
}


/* =========================================================
   CART MESSAGE
========================================================= */

.merch-product-cart-message {
    min-height: 24px;

    margin-top: 0.9rem;

    color: #2f765a;

    font-size: 0.9rem;
    font-weight: 700;

    opacity: 0;

    transition:
        opacity 0.2s ease;
}

.merch-product-cart-message.is-visible {
    opacity: 1;
}


/* =========================================================
   BRAND STORY
========================================================= */

.merch-product-story {
    padding: 5rem 0;

    background: #f6f8f9;
}

.merch-product-story-inner {
    max-width: 780px;

    margin: 0 auto;

    text-align: center;
}

.merch-product-story-eyebrow {
    display: inline-block;

    margin-bottom: 0.75rem;

    color: #bd3640;

    font-size: 0.82rem;
    font-weight: 800;

    letter-spacing: 0.14em;

    text-transform: uppercase;
}

.merch-product-story h2 {
    margin-bottom: 1rem;

    color: #173b55;

    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
}

.merch-product-story p {
    margin: 0;

    color: #5f6f73;

    font-size: 1.05rem;
    line-height: 1.8;
}


/* =========================================================
   LITTLE HERO MISSION
========================================================= */

.merch-product-mission {
    padding: 5rem 0;

    background: #ffffff;
}

.merch-product-mission-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr) minmax(0, 1.1fr);

    gap: 4rem;

    align-items: start;
}

.merch-product-mission h2 {
    margin: 0;

    color: #173b55;

    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
}

.merch-product-mission p {
    margin-bottom: 1.4rem;

    color: #5f6f73;

    font-size: 1.02rem;
    line-height: 1.8;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {

    .merch-product-layout {
        grid-template-columns: 1fr;

        gap: 2.5rem;
    }

    .merch-product-info {
        position: static;
    }


    .merch-product-mission-grid {
        grid-template-columns: 1fr;

        gap: 1.75rem;
    }

}


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

@media (max-width: 700px) {

    .merch-product-detail {
        padding-top: 1rem;
    }

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

    .merch-product-thumbnails {
        order: 2;

        flex-direction: row;

        overflow-x: auto;

        padding-bottom: 0.35rem;
    }

    .merch-product-thumbnail {
        flex: 0 0 76px;
    }

    .merch-product-main-image-wrap {
        order: 1;
    }



    .merch-product-sizes {
        grid-template-columns:
            repeat(4, minmax(52px, 1fr));
    }

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

    .merch-product-favorite-btn {
        width: 100%;
    }

}

/* =========================================================
   ADDED TO CART CONFIRMATION
========================================================= */
.merch-cart-confirmation {
    position: fixed;
    inset: 0;

    z-index: 3000;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}

.merch-cart-confirmation.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.merch-cart-confirmation-panel {
    transform: translateY(-8px) scale(0.985);

    transition:
        transform 0.2s ease;
}

.merch-cart-confirmation.is-open .merch-cart-confirmation-panel {
    transform: translateY(0) scale(1);
}

.merch-cart-confirmation-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(20, 27, 34, 0.42);
}

.merch-cart-confirmation-panel {
    position: absolute;
    top: 96px;
    right: 34px;

    width: min(430px, calc(100vw - 32px));

    padding: 1.45rem;

    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 24px 60px rgba(18, 37, 52, 0.24);
}

.merch-cart-confirmation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: 1.25rem;
}

.merch-cart-confirmation-status {
    display: flex;
    align-items: center;

    gap: 0.7rem;
}

.merch-cart-confirmation-status i {
    color: #1f8a5b;

    font-size: 1.15rem;
}

.merch-cart-confirmation-status h2 {
    margin: 0;

    font-size: 1.25rem;
    font-weight: 800;

    color: #173b55;
}

.merch-cart-confirmation-close {
    width: 40px;
    height: 40px;

    border: 0;
    border-radius: 50%;

    background: #f4f6f7;

    color: #173b55;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.merch-cart-confirmation-item {
    display: grid;
    grid-template-columns: 92px 1fr;

    gap: 1rem;

    align-items: center;

    margin-bottom: 1.35rem;
}

.merch-cart-confirmation-item img {
    width: 92px;
    height: 112px;

    object-fit: contain;

    border-radius: 12px;

    background: #f5f6f7;
}

.merch-cart-confirmation-item div {
    display: flex;
    flex-direction: column;

    gap: 0.25rem;
}

.merch-cart-confirmation-item strong {
    color: #173b55;

    font-size: 1rem;
}

.merch-cart-confirmation-item span {
    color: #5f6f73;

    font-size: 0.9rem;
}

.merch-cart-confirmation-actions {
    display: grid;
    gap: 0.75rem;
}

.merch-cart-confirmation-view,
.merch-cart-confirmation-checkout {
    width: 100%;

    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 0.55rem;

    border-radius: 999px;

    text-decoration: none;

    font-weight: 800;
}

.merch-cart-confirmation-view {
    border: 1px solid #cfd8dd;

    background: #ffffff;

    color: #173b55;
}

.merch-cart-confirmation-view:hover {
    border-color: #173b55;

    color: #173b55;
}

#merchCartConfirmationCount {
    min-width: 24px;
    height: 24px;

    padding: 0 0.4rem;

    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #f5a623;

    color: #173b55;

    font-size: 0.78rem;
    font-weight: 900;
}

.merch-cart-confirmation-checkout {
    margin: 0;
}

@media (max-width: 700px) {

    .merch-cart-confirmation-panel {
        top: auto;
        right: 16px;
        bottom: 16px;
        left: 16px;

        width: auto;
    }

}

/* Larger product-page bag icon */
.merch-product-add-cart i {
    font-size: 1.65rem;
}

/* Product bag icon stays centered on hover */
.merch-product-add-cart i,
.merch-product-add-cart:hover i,
.merch-product-add-cart:focus i,
.merch-product-add-cart:active i {
    font-size: 1.65rem;
    transform: none !important;
    translate: none !important;
    margin: 0 !important;
}

/* =========================================================
   PRODUCT PAGE PERMANENT CART LINK
========================================================= */

.merch-product-cart-link {
    position: relative;

    width: 52px;
    height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d3dde2;
    border-radius: 50%;

    background: #ffffff;

    color: #173b55;

    text-decoration: none;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.merch-product-cart-link:hover {
    color: #173b55;

    border-color: #173b55;

    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(23, 59, 85, 0.12);
}

.merch-product-cart-link i {
    font-size: 1.15rem;
}

.merch-product-cart-link-count {
    position: absolute;

    top: -5px;
    right: -5px;

    min-width: 21px;
    height: 21px;

    padding: 0 0.3rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: #f5a623;

    color: #173b55;

    font-size: 0.72rem;
    font-weight: 900;

    line-height: 1;
}