/* ─── SpaceZenKit – Single Product Widget ────────────────────────────────── */

.szk-single-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: flex-start;
}

/* ══ GALLERY ══════════════════════════════════════════════════════════════ */

.szk-sp-gallery {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: flex-start;
}

.szk-sp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.szk-sp-thumb {
    width: 78px;
    height: 78px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s;
    background: #f7f7f7;
}

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

.szk-sp-thumb:hover,
.szk-sp-thumb.szk-active {
    border-color: #111;
}

.szk-sp-main-wrap {
    position: relative;
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

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

.szk-sp-main-img.szk-fading { opacity: 0; }

.szk-sp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    transition: background 0.2s;
}

.szk-sp-arrow:hover { background: #fff; }

.szk-sp-arrow svg {
    width: 16px;
    height: 16px;
    stroke: #111;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.szk-sp-arrow-prev { left: 10px; }
.szk-sp-arrow-next { right: 10px; }

/* ══ PRODUCT INFO ═════════════════════════════════════════════════════════ */

.szk-sp-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.szk-sp-title {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin: 0 !important;
    padding: 0 !important;
}

.szk-sp-price-wrap .price {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.szk-sp-price-wrap .price del { color: #999; font-weight: 400; font-size: 16px; }
.szk-sp-price-wrap .price ins { text-decoration: none; color: #e53935; }

.szk-sp-short-desc { font-size: 14px; color: #555; line-height: 1.7; }
.szk-sp-short-desc p:last-child { margin-bottom: 0; }

.szk-sp-stock {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.szk-sp-stock::before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
}

.szk-sp-stock.in-stock             { color: #2e7d32; }
.szk-sp-stock.in-stock::before     { background: #2e7d32; }
.szk-sp-stock.out-of-stock         { color: #c62828; }
.szk-sp-stock.out-of-stock::before { background: #c62828; }
.szk-sp-stock.available-on-backorder         { color: #e65100; }
.szk-sp-stock.available-on-backorder::before { background: #e65100; }

/* ══ VARIATIONS TABLE — plugin-compatible ═════════════════════════════════
   We set minimal structural styles only.
   The active swatches plugin (e.g. WooCommerce Variation Swatches) will
   replace/enhance the <select> elements with its own UI.
══════════════════════════════════════════════════════════════════════════ */

.szk-sp-info .variations {
    width: 100%;
    border: none;
    border-collapse: collapse;
    margin-bottom: 4px;
}

.szk-sp-info .variations tr {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.szk-sp-info .variations .label label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

/* Inline "selected value" indicator  e.g.  COLOR : Black  */
.szk-sp-info .szk-attr-val {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #555;
}

.szk-sp-info .variations .value {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Reset link */
.szk-sp-info .variations .reset_variations {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #777;
    text-decoration: none;
    cursor: pointer;
    width: fit-content;
}

.szk-sp-info .variations .reset_variations:hover { color: #111; }

/* Variation info block (price / availability shown after selecting) */
.szk-sp-info .woocommerce-variation.single_variation {
    margin-bottom: 6px;
}

.szk-sp-info .woocommerce-variation .price {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

/* ══ QUANTITY + ADD TO CART ═══════════════════════════════════════════════ */

.szk-cart-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Quantity box with +/− buttons */
.szk-qty-wrap {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    height: 44px;
}

.szk-qty-btn {
    width: 36px;
    flex-shrink: 0;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s;
    user-select: none;
    -webkit-user-select: none;
}

.szk-qty-btn:hover { background: #e8e8e8; }
.szk-qty-btn:active { background: #ddd; }

.szk-qty-wrap input[type="number"] {
    width: 48px !important;
    border: none !important;
    border-left: 1px solid #e0e0e0 !important;
    border-right: 1px solid #e0e0e0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    text-align: center !important;
    background: transparent !important;
    padding: 0 4px !important;
    margin: 0 !important;
    -webkit-appearance: textfield !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    height: 100% !important;
    color: #111 !important;
}

.szk-qty-wrap input[type="number"]::-webkit-outer-spin-button,
.szk-qty-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Add to cart button */
.szk-cart-row .single_add_to_cart_button,
.szk-cart-row button.single_add_to_cart_button {
    flex: 1 !important;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    padding: 0 20px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-shadow: none !important;
    min-width: 120px;
}

.szk-cart-row .single_add_to_cart_button:hover {
    background: #333 !important;
}

.szk-cart-row .single_add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ══ RESPONSIVE ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .szk-single-product {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 600px) {
    .szk-sp-gallery {
        grid-template-columns: 1fr;
    }

    .szk-sp-thumbs {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .szk-sp-thumb { flex-shrink: 0; }

    .szk-cart-row {
        flex-wrap: wrap !important;
    }

    .szk-cart-row .single_add_to_cart_button {
        width: 100% !important;
    }
}
