/* =========================================================
   MARTISH THEME - SINGLE PRODUCT PAGE
   ========================================================= */

.single-product-section {
    padding: 40px 0 60px;
}

.single-product-section .container {
    max-width: 1320px;
}

.martish-product-row {
    row-gap: 40px;
}

/* ---------------------------------------------------------
   PRODUCT GALLERY
--------------------------------------------------------- */
.martish-gallery {
    position: sticky;
    top: 90px; /* below sticky header */
}

.martish-gallery-main {
    position: relative;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background-color: #f5f0e8;
    margin-bottom: 14px;
}

.martish-gallery-main-btn {
    display: block;
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    cursor: zoom-in;
    position: relative;
}

.martish-gallery-main-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.martish-gallery-main-btn:hover .martish-gallery-main-img {
    transform: scale(1.04);
}

.martish-gallery-zoom-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.85);
    color: #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.martish-gallery-main-btn:hover .martish-gallery-zoom-icon {
    opacity: 1;
}

/* Thumbnails strip */
.martish-gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.martish-gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f5f0e8;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

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

.martish-gallery-thumb.is-active,
.martish-gallery-thumb:hover {
    border-color: var(--martish-orange, #f8a51b);
}

/* ---------------------------------------------------------
   PRODUCT SUMMARY
--------------------------------------------------------- */
.martish-product-summary {
    padding: 8px 0;
}

.martish-product-title {
    font-weight: 800;
    font-size: 36px;
    line-height: 1.2;
    color: #1c1c1c;
    margin: 0 0 14px;
}

.martish-product-short-desc {
    font-size: 14.5px;
    color: #6a6a6a;
    line-height: 1.7;
    margin-bottom: 14px;
}

.martish-product-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--martish-orange, #f8a51b);
    margin-bottom: 6px;
}

.martish-product-price del {
    color: #b0b0b0;
    font-weight: 500;
    font-size: 20px;
    margin-right: 8px;
}

.martish-product-price ins {
    text-decoration: none;
}

.martish-divider {
    border: none;
    border-top: 1px solid #efefef;
    margin: 22px 0;
}

.meta-divider {
    margin: 12px 0;
}
.martish-product-meta {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------------------------------------------------------
   ADD TO CART / VARIATION FORM
   Overrides WooCommerce defaults to match screenshot
--------------------------------------------------------- */

/* Topping/variation label */
.variations th.label label {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1c;
}

/* Variation select dropdown */
.variations select {
    width: 100%;
    border: 1.5px solid #e6e6e6;
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 15px;
    color: #1c1c1c;
    background-color: #ffffff;
    appearance: auto;
    margin-bottom: 20px;
}

.variations select:focus {
    outline: none;
    border-color: var(--martish-orange, #f8a51b);
}

.variations table {
    width: 100%;
    border-collapse: collapse;
}

.variations td,
.variations th {
    padding: 0;
    vertical-align: top;
}

.variations th.label {
    padding-bottom: 8px;
    display: block;
}

/* Quantity + button row */
.woocommerce-variation-add-to-cart,
.cart {
    display: flex !important;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

/* Quantity box */
.quantity {
    display: flex !important;
    align-items: center;
    gap: 0;
    border: 1.5px solid #e0e0e0;
    border-radius: 30px;
    overflow: hidden;
    flex-shrink: 0;
}

.quantity .qty {
    width: 48px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    padding: 10px 0;
    background: transparent;
    -moz-appearance: textfield;
}

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

/* Custom qty +/- buttons (injected by JS) */
.martish-qty-minus,
.martish-qty-plus {
    width: 40px;
    height: 42px;
    border: none;
    background: transparent;
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.martish-qty-minus:hover,
.martish-qty-plus:hover {
    color: var(--martish-orange, #f8a51b);
}

/* Add to cart button */
.single_add_to_cart_button,
button.single_add_to_cart_button {
    flex: 1 1 auto;
    color: #1c1c1c !important;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.2s ease;
    
    background-color: var(--martish-orange) !important;
    padding: 14px 24px !important;
    font-weight: 701 !important;
    font-family: var(--martish-font);
    border-radius: 7px !important;
}

.single_add_to_cart_button:hover {
    background-color: var(--primary) !important;
    /*transform: translateY(-2px);*/
    color: var(--martish-white) !important;
}

/* Wishlist button (next to add-to-cart) */
.martish-wishlist-single {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid #e0e0e0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.martish-wishlist-single:hover {
    color: #e53935;
    border-color: #e53935;
}

/* ---------------------------------------------------------
   PRODUCT META (SKU, Category, Share)
--------------------------------------------------------- */
.martish-product-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.martish-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
}

.martish-meta-label {
    color: #6a6a6a;
    font-weight: 600;
    flex-shrink: 0;
}

.martish-meta-value {
    color: #1c1c1c;
    font-weight: 600;
}

.martish-meta-value a {
    color: var(--martish-green-dark, #4caf50);
}

.martish-meta-value a:hover {
    color: var(--martish-orange, #f8a51b);
}

/* Share icons */
.martish-share-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.martish-share-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    color: #6a6a6a;
    border: 1px solid #e6e6e6;
}

.martish-share-icons a:hover {
    color: var(--martish-orange, #f8a51b);
    border-color: var(--martish-orange, #f8a51b);
}

/* ---------------------------------------------------------
   SAFE CHECKOUT BADGE
--------------------------------------------------------- */
.martish-safe-checkout {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.martish-safe-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14.5px;
    color: #1c1c1c;
    white-space: nowrap;
}

.martish-safe-badges-img {
    max-height: 32px;
    width: auto;
}

/* ---------------------------------------------------------
   PRODUCT TABS (Description / Additional Info)
--------------------------------------------------------- */
.martish-product-tabs-section {
    margin-top: 50px;
    border-bottom: 1px solid #efefef;
    padding-top: 30px;
}

/* Tab nav */
.woocommerce-tabs .tabs {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    border-bottom: none;
}

.woocommerce-tabs .tabs li {
    margin: 0;
}

.woocommerce-tabs .tabs li a {
    display: block;
    color: #1c1c1c;
    font-weight: 800;
    font-size: 15px;
    padding: 13px 28px;
    border-radius: 30px;
    border: none;
}

.woocommerce-tabs .tabs li.active a,
.woocommerce-tabs .tabs li a:hover {
    background-color: var(--martish-orange, #f8a51b);
    color: #1c1c1c;
}

.woocommerce-tabs .panel {
    padding: 0;
    border: none;
    font-size: 15px;
    line-height: 1.8;
    color: #4a4a4a;
}

/* ---------------------------------------------------------
   LIGHTBOX
--------------------------------------------------------- */
.martish-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.martish-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.martish-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 0;
}

.martish-lightbox-img-wrap {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.martish-lightbox-img {
    max-width: 88vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    transition: opacity 0.25s ease;
}

.martish-lightbox-img.is-loading {
    opacity: 0.3;
}

.martish-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.martish-lightbox-close:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.8);
}

.martish-lightbox-prev,
.martish-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.martish-lightbox-prev { left: 20px; }
.martish-lightbox-next { right: 20px; }

.martish-lightbox-prev:hover,
.martish-lightbox-next:hover {
    background-color: var(--martish-orange, #f8a51b);
    border-color: var(--martish-orange, #f8a51b);
    color: #1c1c1c;
}

.martish-lightbox-counter {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Thumbnail strip inside lightbox */
.martish-lightbox-thumbs {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.martish-lightbox-thumbs .lb-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.martish-lightbox-thumbs .lb-thumb.is-active {
    border-color: var(--martish-orange, #f8a51b);
    opacity: 1;
}

.martish-lightbox-thumbs .lb-thumb:hover {
    opacity: 1;
}

.martish-lightbox-thumbs .lb-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide prev/next when single image */
.martish-lightbox.is-single .martish-lightbox-prev,
.martish-lightbox.is-single .martish-lightbox-next,
.martish-lightbox.is-single .martish-lightbox-thumbs,
.martish-lightbox.is-single .martish-lightbox-counter {
    display: none;
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 991.98px) {
    .martish-gallery {
        position: static;
    }

    .martish-product-title {
        font-size: 28px;
    }

    .martish-product-price {
        font-size: 24px;
    }
}

@media (max-width: 575.98px) {
    .woocommerce-variation-add-to-cart,
    .cart {
        flex-wrap: wrap;
    }

    .single_add_to_cart_button {
        width: 100%;
    }

    .martish-lightbox-prev { left: 8px; }
    .martish-lightbox-next { right: 8px; }

    .martish-lightbox-thumbs .lb-thumb {
        width: 42px;
        height: 42px;
    }
}
