/* ═══════════════════════════════════════════
   TIMILUC SRL — Single Product
   Gallery, product info, configurator,
   tabs, related products, WooCommerce resets.
   ═══════════════════════════════════════════ */


/* ─── WOOCOMMERCE RESETS ─── */
.woocommerce div.product,
.woocommerce #content div.product {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.woocommerce div.product .woocommerce-product-gallery,
.woocommerce div.product .summary {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce div.product .woocommerce-tabs {
    float: none !important;
    clear: both;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    display: none !important;
}


/* ─── PAGE WRAPPER ─── */
.tml-sp-page {
    background: var(--tml-bg);
    min-height: 100vh;
    padding-top: clamp(100px, 14vw, 140px);
}


/* ─── BREADCRUMB ─── */
.tml-sp-breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 24px;
}

.tml-sp-breadcrumb a,
.tml-sp-breadcrumb span {
    font-size: 0.7rem;
    color: var(--tml-muted);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--tml-transition);
}

.tml-sp-breadcrumb a:hover {
    color: var(--tml-cyan);
}

.tml-sp-breadcrumb .tml-sp-breadcrumb-sep {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.15);
}

.tml-sp-breadcrumb .tml-sp-breadcrumb-current {
    color: var(--tml-white);
}


/* ─── PRODUCT LAYOUT ─── */
.tml-sp-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .tml-sp-main {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }
}

@media (min-width: 1024px) {
    .tml-sp-main {
        gap: 60px;
    }
}


/* ─── PRODUCT GALLERY ─── */
.tml-sp-gallery {
    position: relative;
}

@media (min-width: 768px) {
    .tml-sp-gallery {
        position: sticky;
        top: var(--tml-header-offset, 108px);
        align-self: flex-start;
    }
}

.tml-sp-gallery-main {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--tml-bg2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    aspect-ratio: 1 / 1;
}

.tml-sp-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tml-sp-gallery-main:hover img {
    transform: scale(1.04);
}

.tml-sp-gallery-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    padding: 6px 14px;
    border-radius: 60px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--tml-error);
    color: #fff;
}

.tml-sp-gallery-zoom {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(1, 11, 20, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tml-white);
    cursor: pointer;
    transition: all var(--tml-transition);
}

.tml-sp-gallery-zoom:hover {
    background: var(--tml-cyan);
    color: var(--tml-bg);
    border-color: var(--tml-cyan);
}

/* Thumbnails */
.tml-sp-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.tml-sp-gallery-thumb {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--tml-transition);
    background: var(--tml-bg2);
    aspect-ratio: 1 / 1;
}

.tml-sp-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: opacity var(--tml-transition);
}

.tml-sp-gallery-thumb:hover img,
.tml-sp-gallery-thumb.active img {
    opacity: 1;
}

.tml-sp-gallery-thumb.active {
    border-color: var(--tml-cyan);
}


/* ─── PRODUCT INFO ─── */
.tml-sp-info {
    display: flex;
    flex-direction: column;
}

.tml-sp-cat {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--tml-gold);
    margin-bottom: 12px;
}

.tml-sp-title {
    font-family: var(--tml-font-serif);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--tml-white);
    line-height: 1.15;
    margin-bottom: 16px;
}

.tml-sp-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.tml-sp-rating-stars {
    display: flex;
    gap: 3px;
    color: var(--tml-gold);
}

.tml-sp-rating-stars svg {
    width: 14px;
    height: 14px;
}

.tml-sp-rating-count {
    font-size: 0.75rem;
    color: var(--tml-muted);
    font-weight: 400;
}

.tml-sp-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin: 20px 0;
}

/* Price */
.tml-sp-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.tml-sp-price-current {
    font-family: var(--tml-font-serif);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--tml-gold);
}

.tml-sp-price-old {
    font-size: 1rem;
    color: var(--tml-muted);
    text-decoration: line-through;
}

.tml-sp-price-unit {
    font-size: 0.8rem;
    color: var(--tml-muted);
    font-weight: 400;
}

/* Short description */
.tml-sp-short-desc {
    font-size: 0.85rem;
    color: var(--tml-txt);
    line-height: 1.75;
    font-weight: 300;
    margin-bottom: 24px;
}

.tml-sp-short-desc p {
    margin-bottom: 0.75em;
}

.tml-sp-short-desc p:last-child {
    margin-bottom: 0;
}

/* Features list */
.tml-sp-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.tml-sp-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--tml-txt);
    font-weight: 400;
}

.tml-sp-feature-ico {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 206, 209, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tml-sp-feature-ico svg {
    width: 10px;
    height: 10px;
    color: var(--tml-cyan);
}


/* ─── CONFIGURATOR SECTION ─── */
.tml-sp-configurator {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
}

.tml-sp-configurator-title {
    font-family: var(--tml-font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tml-white);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tml-sp-configurator-title svg {
    color: var(--tml-cyan);
    width: 18px;
    height: 18px;
}

.tml-sp-config-group {
    margin-bottom: 18px;
}

.tml-sp-config-group:last-child {
    margin-bottom: 0;
}

.tml-sp-config-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tml-muted);
    margin-bottom: 8px;
}

.tml-sp-config-input,
.tml-sp-config-select,
.tml-sp-config-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--tml-bg);
    color: var(--tml-white);
    font-size: 0.85rem;
    font-family: var(--tml-font-sans);
    transition: border-color var(--tml-transition);
}

.tml-sp-config-input:focus,
.tml-sp-config-select:focus,
.tml-sp-config-textarea:focus {
    outline: none;
    border-color: var(--tml-cyan);
}

.tml-sp-config-select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235a6a7a' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.tml-sp-config-textarea {
    min-height: 80px;
    resize: vertical;
}

.tml-sp-config-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (min-width: 768px) {
    .tml-sp-config-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tml-sp-config-option {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: var(--tml-txt);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tml-transition);
    text-align: center;
    font-family: var(--tml-font-sans);
}

.tml-sp-config-option:hover {
    border-color: rgba(0, 206, 209, 0.3);
    color: var(--tml-cyan);
}

.tml-sp-config-option.selected {
    border-color: var(--tml-cyan);
    background: rgba(0, 206, 209, 0.08);
    color: var(--tml-cyan);
}

/* Calculated price display */
.tml-sp-config-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 10px;
    background: rgba(0, 206, 209, 0.04);
    border: 1px solid rgba(0, 206, 209, 0.1);
    margin-top: 20px;
}

.tml-sp-config-total-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tml-muted);
}

.tml-sp-config-total-price {
    font-family: var(--tml-font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--tml-gold);
}


/* ─── QUANTITY ─── */
.tml-sp-qty {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.tml-sp-qty-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--tml-muted);
}

.tml-sp-qty-ctrl {
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.tml-sp-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--tml-txt);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--tml-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tml-sp-qty-btn:hover {
    background: rgba(0, 206, 209, 0.08);
    color: var(--tml-cyan);
}

.tml-sp-qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: var(--tml-white);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--tml-font-sans);
}

.tml-sp-qty-input:focus {
    outline: none;
}


/* ─── ACTION BUTTONS ─── */
.tml-sp-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

@media (min-width: 480px) {
    .tml-sp-actions {
        flex-direction: row;
    }
}

.tml-sp-btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    padding: 14px 28px;
    border-radius: 12px;
    background: var(--tml-cyan);
    color: var(--tml-bg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: none;
    cursor: pointer;
    transition: all var(--tml-transition);
    font-family: var(--tml-font-sans);
    text-decoration: none;
}

.tml-sp-btn-cart:hover {
    background: var(--tml-cyan-dim);
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 206, 209, 0.25);
}

.tml-sp-btn-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    padding: 14px 28px;
    border-radius: 12px;
    background: transparent;
    color: var(--tml-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: 1px solid rgba(212, 175, 55, 0.2);
    cursor: pointer;
    transition: all var(--tml-transition);
    font-family: var(--tml-font-sans);
    text-decoration: none;
}

.tml-sp-btn-quote:hover {
    border-color: var(--tml-gold);
    background: rgba(212, 175, 55, 0.06);
}


/* ─── META INFO ─── */
.tml-sp-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.tml-sp-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
}

.tml-sp-meta-label {
    color: var(--tml-muted);
    font-weight: 400;
    min-width: 80px;
}

.tml-sp-meta-value {
    color: var(--tml-txt);
    font-weight: 500;
}

.tml-sp-meta-value a {
    color: var(--tml-cyan);
    text-decoration: none;
    transition: color var(--tml-transition);
}

.tml-sp-meta-value a:hover {
    color: var(--tml-cyan-dim);
}


/* ─── TABS ─── */
.tml-sp-tabs-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(50px, 8vw, 80px) 24px;
}

.tml-sp-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tml-sp-tab-btn {
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--tml-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all var(--tml-transition);
    font-family: var(--tml-font-sans);
    white-space: nowrap;
}

.tml-sp-tab-btn:hover {
    color: var(--tml-white);
}

.tml-sp-tab-btn.active {
    color: var(--tml-cyan);
    border-bottom-color: var(--tml-cyan);
}

.tml-sp-tab-panel {
    display: none;
}

.tml-sp-tab-panel.active {
    display: block;
}

/* Tab content: description */
.tml-sp-tab-content {
    font-size: 0.88rem;
    color: var(--tml-txt);
    line-height: 1.8;
    font-weight: 300;
}

.tml-sp-tab-content h2,
.tml-sp-tab-content h3 {
    font-family: var(--tml-font-serif);
    font-weight: 700;
    color: var(--tml-white);
    margin: 1.5rem 0 0.75rem;
}

.tml-sp-tab-content h2 { font-size: 1.4rem; }
.tml-sp-tab-content h3 { font-size: 1.15rem; }

.tml-sp-tab-content p {
    margin-bottom: 1em;
}

.tml-sp-tab-content ul,
.tml-sp-tab-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.tml-sp-tab-content li {
    margin-bottom: 0.4em;
}

.tml-sp-tab-content img {
    border-radius: 12px;
    margin: 1.5rem 0;
}


/* Tab content: reviews */
.tml-sp-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tml-sp-review {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 24px;
}

.tml-sp-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tml-sp-review-author {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tml-white);
}

.tml-sp-review-date {
    font-size: 0.7rem;
    color: var(--tml-muted);
}

.tml-sp-review-stars {
    display: flex;
    gap: 3px;
    color: var(--tml-gold);
    margin-bottom: 10px;
}

.tml-sp-review-stars svg {
    width: 13px;
    height: 13px;
}

.tml-sp-review-body {
    font-size: 0.85rem;
    color: var(--tml-txt);
    line-height: 1.7;
    font-weight: 300;
}

/* Review form */
.tml-sp-review-form {
    margin-top: 2rem;
    padding: 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.tml-sp-review-form h3 {
    font-family: var(--tml-font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tml-white);
    margin-bottom: 16px;
}


/* ─── RELATED PRODUCTS ─── */
.tml-sp-related {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px clamp(60px, 10vw, 120px);
}

.tml-sp-related-title {
    font-family: var(--tml-font-serif);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--tml-white);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tml-sp-related-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
}

.tml-sp-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 540px) {
    .tml-sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .tml-sp-related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .tml-sp-related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ─── STOCK STATUS ─── */
.tml-sp-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.tml-sp-stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.tml-sp-stock--in .tml-sp-stock-dot {
    background: var(--tml-success);
    box-shadow: 0 0 6px var(--tml-success);
}

.tml-sp-stock--in {
    color: var(--tml-success);
}

.tml-sp-stock--out .tml-sp-stock-dot {
    background: var(--tml-error);
}

.tml-sp-stock--out {
    color: var(--tml-error);
}


/* ─── RESPONSIVE ─── */
@media (max-width: 767px) {
    .tml-sp-gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .tml-sp-tabs-nav {
        gap: 0;
    }

    .tml-sp-tab-btn {
        padding: 12px 16px;
        font-size: 0.65rem;
    }

    .tml-sp-configurator {
        padding: 18px;
    }

    .tml-sp-config-options {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ─── ASTRA / WC RESETS (page-specific) ─── */
body.tml-dark-product .site-content,
body.tml-dark-product #primary,
body.tml-dark-product #content,
body.tml-dark-product .ast-container {
    background-color: var(--tml-bg) !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

body.tml-dark-product .ast-article-single .entry-header,
body.tml-dark-product .woocommerce-breadcrumb,
body.tml-dark-product .woocommerce-product-rating {
    display: none !important;
}


/* ─── SUCCESS MODAL ─── */
.tml-sp-modal {
    position: fixed;
    inset: 0;
    background: rgba(1, 11, 20, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tml-sp-modal.active {
    opacity: 1;
    visibility: visible;
}

.tml-sp-modal-content {
    background: var(--tml-bg2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tml-sp-modal.active .tml-sp-modal-content {
    transform: translateY(0);
}


/* ─── SPINNER KEYFRAME ─── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
