/**
 * Shopify Companion – Single product automated layout (2-column, high-end).
 * Colors use Kadence Global Palette — change once in Customizer.
 */

.pe-single-product {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.pe-single-product__main {
    display: grid;
    grid-template-columns: minmax(0, 360px) 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .pe-single-product__main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.pe-single-product__col {
    min-width: 0;
}

.pe-single-product__col--gallery {
    position: sticky;
    top: 1.5rem;
}

/* Sticky right column: Buy button stays visible on scroll */
.pe-single-product__sticky {
    position: sticky;
    top: 1.5rem;
}

.pe-single-product__sticky-inner {
    position: relative;
}

@media (max-width: 900px) {
    .pe-single-product__col--gallery,
    .pe-single-product__sticky {
        position: static;
    }
}

.pe-single-product__gallery {
    position: relative;
}

.pe-single-product__gallery-main {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    background: var(--global-palette9, #f8f9fa);
}

.pe-single-product__gallery-main .pe-single-product__img,
.pe-single-product__gallery-main img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pe-single-product__gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.pe-single-product__gallery-thumb-btn {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    transition: border-color 0.2s ease;
}

.pe-single-product__gallery-thumb-btn:hover,
.pe-single-product__gallery-thumb-btn:focus {
    border-color: var(--global-palette1, #2c6dff);
    outline: none;
}

.pe-single-product__gallery-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.pe-single-product__price-block {
    margin-bottom: 0.5rem;
}

.pe-single-product__regular-price {
    margin: 0.25rem 0;
}

.pe-single-product__compare-at {
    text-decoration: line-through;
    color: #666;
}

.pe-single-product__sale-price {
    font-size: 1.15em;
    color: #c00;
    font-weight: 600;
    margin: 0.25rem 0;
}

.pe-single-product__savings {
    color: #0a6;
    font-weight: 600;
    margin: 0.25rem 0;
}

.pe-single-product__description-inline {
    margin: 1rem 0 1.25rem;
}

.pe-single-product__description-inline .pe-single-product__description-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--global-palette4, #333);
}

.pe-single-product__description-inline .pe-single-product__description-content p {
    margin: 0 0 0.5rem;
}

.pe-single-product__description-inline .pe-single-product__description-content p:last-child {
    margin-bottom: 0;
}

.pe-single-product__metafields {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.pe-single-product__metafields-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1.5rem;
}

.pe-single-product__metafields-list dt {
    font-weight: 600;
    margin: 0;
}

.pe-single-product__metafields-list dd {
    margin: 0;
}

.pe-single-product__variants-specs,
.pe-single-product__dimensions {
    margin-top: 1.5rem;
}

.pe-single-product__variants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.pe-single-product__variants-table th,
.pe-single-product__variants-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.pe-single-product__variants-table th {
    font-weight: 600;
}

.pe-single-product__variants-table .pe-variant-compare {
    text-decoration: line-through;
    color: #666;
    margin-right: 0.25rem;
}

.pe-single-product__variants-table .pe-variant-sale {
    color: #c00;
    font-weight: 600;
}

.pe-single-product__variants-table .js-pe-variant-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.pe-single-product__variants-table .js-pe-variant-row:hover {
    background-color: rgba(0,0,0,0.04);
}

.pe-single-product__variants-table .js-pe-variant-row.is-selected {
    background-color: rgba(34, 113, 177, 0.1);
}

/* Special order notice under actions */
.pe-single-product__special-order-note {
    margin-top: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.10);
}

.pe-single-product__special-order-note p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Buy button wrapper note (shortcode) */
.pe-special-order-wrap .pe-special-order-note {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.pe-single-product__image-wrap {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    background: var(--global-palette9, #f8f9fa);
}

.pe-single-product__img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pe-single-product__img-placeholder {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--global-palette5, #adb5bd);
    font-size: 1rem;
}

/* Staff-pick / promo badges (under title; not the old full-width strip above the layout) */
.pe-single-product__promo-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    margin: 0 0 0.75rem;
}

.pe-single-product__promo-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 4px;
    background: var(--global-palette8, #e9ecef);
    color: var(--global-palette3, #1b202c);
}

.pe-single-product__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--global-palette3, #1a1a1a);
}

.pe-single-product__price {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--global-palette1, #2c6dff);
    letter-spacing: -0.02em;
}

/* Price Match Guarantee: below price */
.pe-single-product__price-match {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--global-palette5, #6c757d);
}

.pe-single-product__variants {
    margin-bottom: 1.25rem;
}

.pe-single-product__variants .pe-variant-select,
.pe-single-product__variants select {
    width: 100%;
    max-width: 320px;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--global-palette7, #dee2e6);
    border-radius: 8px;
    background: var(--global-palette9, #fff);
}

.pe-single-product__variants select:focus {
    outline: none;
    border-color: var(--global-palette1, #2c6dff);
    box-shadow: 0 0 0 3px rgba(44, 109, 255, 0.15);
}

.pe-single-product__actions {
    margin-top: 1.5rem;
}

.pe-single-product__actions .pe-btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--global-palette9, #fff);
    background: var(--global-palette1, #2c6dff);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.05s ease;
}

.pe-single-product__actions .pe-btn-buy .pe-btn-buy__icon {
    flex-shrink: 0;
}

.pe-single-product__actions .pe-btn-buy:hover {
    background: var(--global-palette2, #1a5ce8);
    color: var(--global-palette9, #fff);
}

.pe-single-product__actions .pe-btn-buy:active {
    transform: scale(0.98);
}

.pe-single-product__actions .pe-btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--global-palette5, #6c757d);
    background: var(--global-palette8, #e9ecef);
    border-radius: 8px;
    cursor: not-allowed;
}

/* Trust Badges: below Buy button */
.pe-single-product__trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
}

.pe-trust-badge {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--global-palette5, #6c757d);
}

/* Brand Info */
.pe-single-product__brand {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--global-palette7, #dee2e6);
}

.pe-single-product__brand-title {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--global-palette5, #6c757d);
}

.pe-single-product__brand-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--global-palette3, #1a1a1a);
}

/* Product Specifications section */
.pe-single-product__specs {
    padding-top: 2rem;
    border-top: 1px solid var(--global-palette7, #dee2e6);
}

.pe-single-product__specs-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--global-palette3, #1a1a1a);
}

.pe-single-product__specs-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--global-palette4, #333);
}

.pe-single-product__specs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.pe-single-product__specs-content th,
.pe-single-product__specs-content td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--global-palette7, #dee2e6);
}

.pe-single-product__specs-content th {
    font-weight: 600;
    background: var(--global-palette9, #f8f9fa);
}

.pe-single-product__specs-content ul,
.pe-single-product__specs-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

/* ==========================================================================
   CLEARANCE PRODUCT STYLES
   ========================================================================== */

.pe-single-product__clearance-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pe-single-product__clearance-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    animation: pe-pulse-clearance 2s infinite;
}

/* In-Store Clearance: warm amber – purchase in-store only */
.pe-single-product__clearance-badge--instore {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    animation: pe-pulse-clearance-instore 2s infinite;
}

@keyframes pe-pulse-clearance-instore {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(230, 126, 34, 0); }
}

/* Online Clearance: red – purchase online or in-store */
.pe-single-product__clearance-badge--online {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

@keyframes pe-pulse-clearance {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 107, 107, 0); }
}

.pe-single-product__instore-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #4dabf7 0%, #339af0 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.pe-single-product__clearance-pricing {
    padding: 1rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.pe-single-product__clearance-pricing p {
    margin: 0.5rem 0;
}

.pe-single-product__clearance-price {
    font-size: 1.125rem;
}

.pe-single-product__clearance-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b6b;
}

.pe-single-product__clearance-qty {
    font-style: italic;
    color: #666;
}

.pe-single-product__instore-notice {
    padding: 1.25rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    border-left: 4px solid #4dabf7;
    margin: 1rem 0;
}

.pe-single-product__instore-notice p {
    margin: 0;
    font-size: 1rem;
    color: #1565c0;
}

.pe-single-product__instore-notice::before {
    content: '🏪 ';
}
