/* ==========================================================================
   GentsTime — Single Product Page
   ========================================================================== */

.gt-single-product {
    padding-block: 40px 80px;
}

/* ── Two-column layout ─────────────────────────────────────────── */
.gt-sp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 56px;
}

/* ══════════════════════════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════════════════════════ */
.gt-sp-gallery-wrap {
    display: flex;
    gap: 12px;
    position: sticky;
    top: 90px;
}

.gt-sp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 76px;
    flex-shrink: 0;
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.gt-sp-thumb {
    width: 76px;
    height: 76px;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

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

.gt-sp-thumb:hover,
.gt-sp-thumb.active {
    border-color: var(--brand);
}

.gt-sp-main-img {
    flex: 1;
    position: relative;
    overflow: visible;
}

.gt-sp-zoom-wrap {
    position: relative;
    border-radius: 14px;
    border: 1px solid var(--border);
    cursor: crosshair;
    background: #f9f9f9;
    overflow: hidden;
}

.gt-sp-featured-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    transition: opacity 0.2s;
}

/* Lens: moved to body by JS so it is never clipped — position:fixed */
.gt-sp-zoom-lens {
    position: fixed;
    border: 2px solid var(--brand);
    background: rgba(201, 168, 76, 0.18);
    pointer-events: none;
    display: none;
    border-radius: 6px;
    z-index: 9001;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Result: position:fixed, JS sets left/top/height on mouseenter */
.gt-sp-zoom-result {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 500px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    background-repeat: no-repeat;
    background-color: #fff;
    display: none;
    z-index: 99;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .16);
}

.gt-sp-badge-sale {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 3;
}

/* ══════════════════════════════════════════════════════════════════
   SUMMARY
══════════════════════════════════════════════════════════════════ */
.gt-sp-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gt-sp-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
}

/* Rating */
.gt-sp-rating {
    display: flex;
    align-items: center;
    gap: 3px;
}

.gt-star {
    width: 17px;
    height: 17px;
    fill: #e5e7eb;
    flex-shrink: 0;
}

.gt-star--on {
    fill: #f59e0b;
}

.gt-star--half {
    fill: url(#gt-half-grad);
}

.gt-sp-rating-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 6px;
}

/* Price */
.gt-sp-price .price {
    display: flex !important;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.gt-sp-price .woocommerce-Price-amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.gt-sp-price del .woocommerce-Price-amount {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.65;
}

.gt-sp-price ins {
    text-decoration: none;
}

.gt-sp-price ins .woocommerce-Price-amount {
    color: #ef4444;
}

/* ── Meta info ─────────────────────────────────────────────────── */
.gt-sp-meta-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.gt-sp-meta-row {
    display: flex;
    align-items: center;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.gt-sp-meta-row:last-child {
    border-bottom: none;
}

.gt-sp-meta-label {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-section);
    padding: 10px 14px;
    min-width: 110px;
    border-right: 1px solid var(--border);
}

.gt-sp-meta-val {
    color: var(--text-secondary);
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 400;
}

.gt-sp-meta-brand {
    font-weight: 500;
    color: var(--brand-hover);
}

.gt-sp-stock--instock {
    color: #16a34a;
    font-weight: 600;
}

.gt-sp-stock--outofstock {
    color: #ef4444;
    font-weight: 600;
}

.gt-sp-stock--onbackorder {
    color: #d97706;
    font-weight: 600;
}

/* ── Form ──────────────────────────────────────────────────────── */
.gt-sp-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Size header row */
.gt-sp-size-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gt-sp-size-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.gt-sp-size-label strong {
    color: var(--brand);
    margin-left: 4px;
}

/* Size chart button */
.gt-size-chart-btn {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
    background: #000;
    border: 1px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.gt-size-chart-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.gt-size-chart-btn:hover {
    background: var(--brand);
    color: #fff;
}

/* Size option buttons */
.gt-sp-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gt-size-opt {
    position: relative;
    min-width: 48px;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gt-size-opt-label {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.gt-size-opt:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.gt-size-opt.selected {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.gt-size-opt.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Hide WC default form UI — we use our own qty + ATC */
.gt-sp-wc-form {
    display: none !important;
}

/* Quantity + Add to Cart row */
.gt-sp-atc-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gt-qty-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.gt-qty-btn {
    width: 40px;
    height: 50px;
    border: none;
    background: var(--bg-section);
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gt-qty-input {
    width: 48px;
    height: 50px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    outline: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    background: #fff;
    -moz-appearance: textfield;
}

.gt-qty-input::-webkit-inner-spin-button,
.gt-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Add to Cart button */
.gt-add-to-cart-btn {
    display: inline-block;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 40px;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.25s,

}

.gt-add-to-cart-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.gt-add-to-cart-btn :hover {
    background: var(--brand-hover);
}

/* Buy Now */
.gt-buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background: var(--text-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.25s, transform 0.15s;
}

.gt-buy-now-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════
   BOTTOM SECTION (Accordions + Related)
══════════════════════════════════════════════════════════════════ */
.gt-sp-bottom {
    margin-top: 0;
}

/* ── Accordions ────────────────────────────────────────────────── */
.gt-sp-accordions {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 60px;
}

.gt-accordion {
    border-bottom: 1px solid var(--border);
}

.gt-accordion:last-child {
    border-bottom: none;
}

.gt-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    gap: 12px;
    transition: background 0.2s;
}

.gt-accordion-trigger:hover {
    background: var(--bg-section);
}

.gt-accordion-trigger[aria-expanded="true"] {
    background: var(--bg-section);
    color: var(--brand);
}

.gt-accordion-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--text-secondary);
}

.gt-accordion-trigger[aria-expanded="true"] .gt-accordion-icon {
    transform: rotate(180deg);
}

.gt-accordion-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    opacity: 0;
}

.gt-accordion-panel.is-open {
    opacity: 1;
}

.gt-accordion-body {
    padding: 10px 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.gt-accordion-body ul {
    padding-left: 20px;
    margin: 0;
}

.gt-accordion-body ul li {
    margin-bottom: 6px;
}

/* ── Related Products ──────────────────────────────────────────── */
.gt-sp-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.gt-sp-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ══════════════════════════════════════════════════════════════════
   SIZE CHART MODAL
══════════════════════════════════════════════════════════════════ */
.gt-size-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
}

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

.gt-size-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

.gt-size-modal-box {
    position: relative;
    background: #fff;
    border-radius: var(--radius-sm);
    width: min(800px, 94vw);
    max-height: fit-content;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: gtModalIn 0.25s ease;
    margin: 10px auto;
}
@media only screen and (min-width: 768px){
    .gt-size-modal-box {
        margin: 30px auto;
    }
}

@keyframes gtModalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gt-size-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
}

.gt-size-modal-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.gt-size-modal-close {
    background:none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gt-size-modal-close:hover {
    color: #ef4444;
}

.gt-size-modal-body {
    padding: 16px 20px;
}

.gt-size-modal-note {
    font-size: 15.5px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.7em;
    padding: 0 !important;
}

.gt-size-modal-note strong {
    font-weight: 600;
}
.gt-size-modal-note p {
    margin-top: 10px;
}

.gt-size-table-wrap {
    overflow-x: auto;
}
.gt-size-table-title{
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.gt-size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gt-size-table th,
.gt-size-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #dfe0e1;
}

.gt-size-table thead th {
    background: #f8f9fa;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}



.gt-size-table tbody td:first-child {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 16px;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .gt-sp-zoom-result {
        display: none !important;
    }

    .gt-sp-zoom-lens {
        display: none !important;
    }

    .gt-sp-zoom-wrap {
        cursor: default;
    }
}

@media (max-width: 900px) {
    .gt-sp-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .gt-sp-gallery-wrap {
        position: static;
    }

    .gt-sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gt-single-product {
        padding-block: 24px 60px;
    }

    .gt-sp-layout {
        gap: 20px;
        margin-bottom: 36px;
    }

    .gt-sp-title {
        font-size: 20px;
    }

    .gt-sp-price .woocommerce-Price-amount {
        font-size: 22px;
    }

    .gt-sp-thumbs {
        width: 60px;
    }

    .gt-sp-thumb {
        width: 60px;
        height: 60px;
    }

    .gt-sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gt-sp-atc-row {
        flex-wrap: wrap;
    }

    .gt-atc-btn {
        flex: unset;
        width: 100%;
    }
}

/* ══════════════════════════════════════════════════════════════════
   COLOR SWATCHES
══════════════════════════════════════════════════════════════════ */
.gt-sp-color-header {
    margin-top: 4px;
}

.gt-sp-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gt-color-swatch {
    position: relative;
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: 50%;
    padding: 0;
    background: none;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gt-color-swatch-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.gt-color-swatch-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    pointer-events: none;
    line-height: 1;
}

.gt-color-swatch:hover {
    border-color: var(--brand);
    transform: scale(1.1);
}

.gt-color-swatch.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand);
}

.gt-color-swatch--oos {
    opacity: 0.5;
    cursor: not-allowed;
}

.gt-color-swatch--oos:hover {
    border-color: var(--border) !important;
    transform: none !important;
}

/* ══════════════════════════════════════════════════════════════════
   OUT-OF-STOCK SIZE BUTTON
══════════════════════════════════════════════════════════════════ */
.gt-size-opt--oos {
    position: relative;
    opacity: 0.6;
    cursor: not-allowed;
    color: var(--text-secondary);
    border-color: var(--border);
    background: #fafafa;
}

.gt-size-opt--oos:hover {
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
    background: #fafafa !important;
    transform: none !important;
}

/* SVG X cross */
.gt-size-opt--oos {
    position: relative;
    opacity: 0.6;
    cursor: not-allowed;
    color: var(--text-secondary);
    border-color: var(--border);
    background: #fafafa;
    overflow: hidden;
}

.gt-size-opt--oos:hover {
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
    background: #fafafa !important;
    transform: none !important;
}

.gt-size-opt--oos .gt-size-opt-label {
    display: none;
}

/* Shake animation when user tries to proceed without selecting size */
@keyframes gt-size-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.gt-size-shake {
    animation: gt-size-shake 0.4s ease;
}

/* ══════════════════════════════════════════════════════════════════
   TOAST  — top-right slide-in
══════════════════════════════════════════════════════════════════ */
/* ================================================================
   TOAST — react-toastify style
================================================================ */
.gt-sp-toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 0;
    width: 320px;
    min-height: 60px;
    background: #fff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(100% + 24px));
    transition: transform 0.4s cubic-bezier(.215, .61, .355, 1), opacity 0.3s ease;
    font-family: sans-serif;
}

.gt-sp-toast--show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* left colour strip */
.gt-sp-toast-icon {
    flex-shrink: 0;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gt-sp-toast-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.gt-sp-toast-body {
    flex: 1;
    min-width: 0;
    padding: 14px 10px 22px 0;
}

.gt-sp-toast-title {
    display: none;
}

.gt-sp-toast-msg {
    display: block;
    font-size: 14.5px;
    font-weight: 500;
    color: #444;
    line-height: 1.45;
}

.gt-sp-toast-close {
    flex-shrink: 0;
    align-self: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #757575;
    padding: 8px 10px 0 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.gt-sp-toast-close:hover {
    opacity: 1;
}

/* progress bar */
.gt-sp-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    transform-origin: left;
    animation: gtToastProgress 4s linear forwards;
}

.gt-sp-toast[data-type="error"] .gt-sp-toast-progress {
    background: rgba(231, 76, 60, 0.5);
}

.gt-sp-toast[data-type="success"] .gt-sp-toast-progress {
    background: rgba(7, 188, 12, 0.5);
}

@keyframes gtToastProgress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 480px) {
    .gt-sp-toast {
        width: calc(100vw - 32px);
        right: 16px;
    }
}