/* ───────────────────────────────────────────────
   Product Page
   ─────────────────────────────────────────────── */

.gh-product {
    padding: clamp(2rem, 4vw, 4rem) 0;
}

.gh-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    align-items: start;
}

/* ── Gallery Column ─────────────────────────── */

.gh-product-gallery-col {
    position: sticky;
    top: 100px;
    width: 100%;
}

.gh-product-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--color-lighter-gray, #f5f5f5);
    border: 1px solid var(--color-light-gray, #e0e0e0);
}

.has-light-text .gh-product-main-image {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.gh-product-main-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.25s ease;
}

.gh-product-main-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    color: var(--color-mid-gray, #999);
}

.gh-product-main-image-placeholder svg {
    opacity: 0.4;
}

.gh-product-main-image-placeholder span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Thumbnails */

.gh-product-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.gh-product-thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

.gh-product-thumb:hover {
    border-color: var(--color-mid-gray, #aaa);
}

.gh-product-thumb.active {
    border-color: var(--ghost-accent-color, #15171a);
}

.has-light-text .gh-product-thumb.active {
    border-color: #fff;
}

.gh-product-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Details Column ─────────────────────────── */

.gh-product-details-col {
    padding-top: 0.5rem;
}

.gh-product-title {
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.is-font-narrow .gh-product-title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gh-product-price {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--ghost-accent-color, #15171a);
    margin-bottom: 1.5rem;
    min-height: 1.2em;
    transition: opacity 0.15s ease;
}

/* ── Variant Selector ───────────────────────── */

.gh-product-variant-section {
    margin-bottom: 1.5rem;
}

.gh-product-variant-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-mid-gray, #888);
    margin-bottom: 0.5rem;
}

.gh-product-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 440px;
}

.gh-product-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 16px 52px 16px 20px;
    font-size: 1.25rem;
    font-weight: 500;
    font-family: inherit;
    font-variation-settings: inherit;
    color: inherit;
    background-color: var(--color-white, #fff);
    border: 2px solid var(--color-light-gray, #ddd);
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.has-light-text .gh-product-select {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.gh-product-select:focus {
    outline: none;
    border-color: #000;
}

.gh-product-select-wrapper::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    pointer-events: none;
    opacity: 0.5;
}

/* ── Buy Button ─────────────────────────────── */

.gh-product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    padding: 18px 44px;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: inherit;
    font-variation-settings: inherit;
    letter-spacing: 0.02em;
    color: #fff;
    text-decoration: none;
    background-color: #000;
    border: 2px solid #000;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-bottom: 0.5rem;
}

.is-font-narrow .gh-product-btn {
    font-size: 2.2rem;
    font-variation-settings: "wdth" 80;
    padding: 16px 44px;
}

.gh-product-btn:hover {
    opacity: 0.8;
}

/* ── Error ──────────────────────────────────── */

.gh-product-error {
    margin-top: 0.75rem;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: #c92a2a;
    background-color: #fff5f5;
    border: 1px solid #ffc9c9;
}

.has-light-text .gh-product-error {
    color: #ff8787;
    background-color: rgba(201, 42, 42, 0.1);
    border-color: rgba(201, 42, 42, 0.3);
}

/* ── Sticky Bottom Bar ──────────────────────── */

.gh-product-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-top: 1px solid var(--color-light-gray, #e0e0e0);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px clamp(1rem, 3vw, 2rem);
}

.has-light-text .gh-product-sticky-bar {
    background: #111;
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.gh-product-sticky-bar.is-visible {
    transform: translateY(0);
}

.gh-product-sticky-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
}

.gh-product-sticky-select-wrapper {
    position: relative;
    flex: 0 0 auto;
    width: 260px;
    max-width: 50%;
}

.gh-product-sticky-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 13px 38px 13px 16px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    font-variation-settings: inherit;
    color: inherit;
    background: var(--color-lighter-gray, #f5f5f5);
    border: 1px solid var(--color-light-gray, #ddd);
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.has-light-text .gh-product-sticky-select {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.gh-product-sticky-select-wrapper::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    pointer-events: none;
    opacity: 0.5;
}

.gh-product-sticky-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 13px 32px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    font-variation-settings: inherit;
    letter-spacing: 0.02em;
    color: #fff;
    text-decoration: none;
    background-color: #000;
    border: 2px solid #000;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.is-font-narrow .gh-product-sticky-btn {
    font-size: 1.6rem;
    font-variation-settings: "wdth" 80;
    padding: 11px 32px;
}

.gh-product-sticky-btn:hover {
    opacity: 0.8;
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 768px) {
    .gh-product-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gh-product-gallery-col {
        position: static;
    }

    .gh-product-details-col {
        position: static;
        padding-top: 0;
    }

    .gh-product-select-wrapper {
        max-width: 100%;
    }

    .gh-product-btn {
        max-width: 100%;
    }

    .gh-product-thumb {
        width: 60px;
        height: 60px;
    }

    .gh-product-sticky-bar {
        padding: 10px clamp(0.75rem, 3vw, 1.5rem);
    }

    .gh-product-sticky-bar-inner {
        gap: 10px;
    }

    .gh-product-sticky-select-wrapper {
        flex: 1;
        width: auto;
        max-width: none;
    }

    .gh-product-sticky-select {
        font-size: 1rem;
        padding: 12px 36px 12px 14px;
    }

    .gh-product-sticky-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* ── Separator between product and content ──── */

.gh-product + .gh-content {
    margin-top: clamp(2rem, 5vw, 4rem);
    padding-top: clamp(1.5rem, 4vw, 3rem);
    border-top: 1px solid var(--color-light-gray, #e0e0e0);
}

.has-light-text .gh-product + .gh-content {
    border-top-color: rgba(255, 255, 255, 0.1);
}
