/* ========================================
   Breadcrumb
======================================== */
.breadcrumb {
    border-bottom: 1px solid var(--grey);
    background: var(--paper-dim);
}

.breadcrumb .container {
    padding: 1rem 2rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--grey-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--grey-text);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--ink);
}

.crumb-sep {
    opacity: 0.5;
}

.crumb-current {
    color: var(--ink);
}

/* ========================================
   Product Layout
======================================== */
.product-detail {
    padding-top: 3rem;
}

.product-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

/* ========================================
   Gallery
======================================== */
.product-gallery {
    position: sticky;
    top: 90px;
}

.gallery-main {
    aspect-ratio: 1 / 1;
    background: var(--paper-dim);
    border: 1px solid var(--grey);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.gallery-thumb {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--grey);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--paper-dim);
    padding: 0;
    transition: border-color 0.2s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--ink);
    border-width: 2px;
}

/* ========================================
   Info Panel
======================================== */
.product-info-panel .product-category {
    font-family: var(--mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grey-text);
}

.product-detail-title {
    font-family: var(--display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0.5rem 0 1rem;
}

.product-detail-price {
    margin-bottom: 1.75rem;
}

.price-tag-large {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
}

/* ========================================
   Option Groups
======================================== */
.option-group {
    margin-bottom: 1.75rem;
}

.option-group h3 {
    font-family: var(--display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.9rem;
}

.option-group h3 span#selected-color-label {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--grey-text);
    font-family: var(--body);
}

.option-group h3 .option-value-static {
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--grey-text);
    font-family: var(--body);
}

.size-guide-link {
    display: inline-block;
    margin-top: 1rem;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--mono);
    font-size: 0.8rem;
    text-decoration: underline;
    color: var(--grey-text);
    cursor: pointer;
    transition: color 0.2s;
}

.size-guide-link:hover {
    color: var(--ink);
}

/* Size buttons — larger, tag-like */
#size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

#size-buttons .size-btn {
    min-width: 56px;
    height: 52px;
    padding: 0 1rem;
    border: 1px solid var(--grey);
    border-radius: var(--radius);
    background: var(--paper);
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

#size-buttons .size-btn:hover:not(:disabled) {
    border-color: var(--ink);
    transform: translateY(-2px);
}

#size-buttons .size-btn.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

#size-buttons .size-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
    transform: none;
}

/* ========================================
   Purchase Row
======================================== */
.purchase-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.qty-selector {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--grey);
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.qty-btn {
    width: 44px;
    background: var(--paper-dim);
    border: none;
    font-size: 1.2rem;
    font-family: var(--display);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--ink);
}

.qty-btn:hover {
    background: var(--grey);
}

#qty-input {
    width: 50px;
    border: none;
    border-left: 1px solid var(--grey);
    border-right: 1px solid var(--grey);
    text-align: center;
    font-family: var(--mono);
    font-size: 1rem;
    -moz-appearance: textfield;
}

#qty-input::-webkit-outer-spin-button,
#qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    flex: 1;
}

.add-to-cart-btn.added {
    background: var(--pine);
}

.stock-status {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--pine);
    margin-bottom: 2rem;
}

.stock-status.unavailable {
    color: var(--coral);
}

/* ========================================
   Description
======================================== */
.product-description {
    border-top: 1px solid var(--grey);
    padding-top: 1.75rem;
    margin-bottom: 1.75rem;
}

.product-description h3 {
    font-family: var(--display);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.product-description p {
    color: var(--grey-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   Value Props
======================================== */
.product-value-props {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.value-prop-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--grey-text);
}

.value-prop-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--pine);
}

/* ========================================
   Size Guide Modal
======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-box {
    background: var(--paper);
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px -20px rgba(26, 26, 26, 0.4);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--grey);
}

.modal-header h2 {
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--paper-dim);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-body img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--grey);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }
}

@media (max-width: 480px) {
    .gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }

    .purchase-row {
        flex-direction: column;
    }

    .qty-selector {
        align-self: flex-start;
    }
}