/* ── Single Product Page ── */
.sp-wrap { padding: 32px 0 60px; }
.sp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 56px;
}
@media(max-width:860px){ .sp-layout { grid-template-columns:1fr; gap:24px; } }

/* Gallery */
.sp-gallery__main {
    position: relative;
    aspect-ratio: 3/4;
    background: #f9fafb;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.sp-gallery__main img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity .3s;
}
.sp-gallery__main .sp-sale-badge {
    position: absolute; top: 16px; left: 16px;
    background: #5c1e3a; color: #fff;
    font-size: 12px; font-weight: 700;
    padding: 4px 12px; border-radius: 20px;
    z-index: 2;
}
.sp-gallery__thumbs {
    display: flex; gap: 10px;
    margin-top: 12px; flex-wrap: wrap;
}
.sp-gallery__thumb {
    width: 72px; height: 72px;
    border-radius: 8px; overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: pointer; transition: border-color .2s;
    flex-shrink: 0;
}
.sp-gallery__thumb img { width:100%; height:100%; object-fit:cover; }
.sp-gallery__thumb.active,
.sp-gallery__thumb:hover { border-color: #5c1e3a; }

/* Product Details */
.sp-details { padding-top: 8px; }
.sp-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #5c1e3a; margin-bottom: 8px; }
.sp-cat a { color: inherit; text-decoration: none; }
.sp-title { font-size: 26px; font-weight: 800; color: #111827; margin: 0 0 12px; line-height: 1.3; }

/* Rating Row */
.sp-rating {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.sp-stars { display: flex; gap: 2px; }
.sp-stars svg { flex-shrink: 0; }
.sp-rating-num { font-size: 14px; font-weight: 700; color: #111827; }
.sp-rating-count { font-size: 13px; color: #6b7280; }
.sp-rating-link {
    font-size: 13px; color: #5c1e3a; font-weight: 600;
    text-decoration: underline; cursor: pointer;
    background: none; border: none; padding: 0;
}

/* Price */
.sp-price { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.sp-price-old { font-size: 16px; color: #9ca3af; text-decoration: line-through; }
.sp-price-current { font-size: 28px; font-weight: 800; color: #5c1e3a; }
.sp-price-save { background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }

/* Short Desc */
.sp-short-desc { font-size: 14px; color: #4b5563; line-height: 1.7; margin-bottom: 20px; background: #f9fafb; padding: 14px 16px; border-radius: 10px; border-left: 3px solid #5c1e3a; }

/* Stock */
.sp-stock { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.sp-stock.instock { color: #16a34a; }
.sp-stock.outstock { color: #ef4444; }
.sp-stock-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Color Swatches */
.sp-swatches-wrap { margin-bottom: 18px; }
.sp-swatch-label { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.sp-swatch-name { color: #5c1e3a; font-weight: 600; }
.sp-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-swatch {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid #e5e7eb; cursor: pointer;
    position: relative; transition: all .2s;
    flex-shrink: 0;
}
.sp-swatch:hover, .sp-swatch.active { border-color: #5c1e3a; transform: scale(1.1); }
.sp-swatch::after {
    content: attr(data-name);
    position: absolute; bottom: 38px; left: 50%;
    transform: translateX(-50%);
    background: #111827; color: #fff;
    font-size: 11px; font-weight: 600;
    padding: 3px 8px; border-radius: 4px;
    white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity .15s;
}
.sp-swatch:hover::after { opacity: 1; }

/* Size Selector */
.sp-size-wrap { margin-bottom: 18px; }
.sp-size-label { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 10px; }
.sp-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-size {
    min-width: 44px; height: 36px; padding: 0 12px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; font-weight: 600; color: #374151;
    cursor: pointer; background: #fff; transition: all .2s;
    display: flex; align-items: center; justify-content: center;
}
.sp-size:hover, .sp-size.active { border-color: #5c1e3a; background: #fff7f4; color: #5c1e3a; }

/* ── WooCommerce Variations Form — Modern Style ── */
.sp-details .variations {
    display: table !important;
    width: 100% !important;
}
.sp-details .variations tr {
    display: flex !important;
    flex-direction: column !important;
}
.sp-details .variations td,
.sp-details .variations th {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
}
.sp-details .variations label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    display: block !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
}
/* Select dropdown style */
.sp-details .variations select {
    width: 100% !important;
    height: 44px !important;
    padding: 0 36px 0 14px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    color: #111827 !important;
    background: #fff !important;
    cursor: pointer !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    transition: border-color .2s, box-shadow .2s !important;
}
.sp-details .variations select:focus {
    outline: none !important;
    border-color: #5c1e3a !important;
    box-shadow: 0 0 0 3px rgba(232,114,58,.12) !important;
}
/* Reset variation link */
.sp-details .reset_variations {
    display: inline-block !important;
    font-size: 12px !important;
    color: #5c1e3a !important;
    text-decoration: underline !important;
    margin-top: 6px !important;
    cursor: pointer !important;
}
/* Variation price update */
.sp-details .woocommerce-variation-price {
    margin: 12px 0 4px !important;
    padding: 10px 0 !important;
    border-top: 1px solid #f3f4f6 !important;
}
.sp-details .woocommerce-variation-price .price {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #5c1e3a !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
.sp-details .woocommerce-variation-price .price del {
    font-size: 16px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
}
.sp-details .woocommerce-variation-price .price ins {
    text-decoration: none !important;
}

/* Qty input with +/- look */
.sp-details .quantity {
    display: flex !important;
    align-items: center !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #fff !important;
}
.sp-details .quantity input[type="number"] {
    width: 64px !important;
    height: 48px !important;
    border: none !important;
    border-left: 1.5px solid #e5e7eb !important;
    border-right: 1.5px solid #e5e7eb !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    background: #fff !important;
    -moz-appearance: textfield !important;
}
.sp-details .quantity input[type="number"]::-webkit-inner-spin-button,
.sp-details .quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
}
.sp-details .quantity input:focus { outline: none !important; }

/* Add to Cart button */
.sp-details .single_add_to_cart_button {
    flex: 1 !important;
    min-width: 160px !important;
    height: 48px !important;
    padding: 0 28px !important;
    background: #5c1e3a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background .2s, transform .1s !important;
    letter-spacing: .01em !important;
}
.sp-details .single_add_to_cart_button:hover {
    background: #d4612b !important;
    transform: translateY(-1px) !important;
}
.sp-details .single_add_to_cart_button:active {
    transform: translateY(0) !important;
}
.sp-details .single_add_to_cart_button.disabled,
.sp-details .single_add_to_cart_button[disabled] {
    background: #d1d5db !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Variation description */
.sp-details .woocommerce-variation-description p {
    font-size: 16px !important;
    color: #6b7280 !important;
    margin: 4px 0 !important;
}

.sp-details .woocommerce-variation-add-to-cart {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 8px !important;
}

/* ── Qty box with custom +/- ── */
.sp-details .quantity {
    display: flex !important;
    align-items: center !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #fff !important;
    height: 48px !important;
    flex-shrink: 0 !important;
}

.sp-details .quantity input[type="number"] {
    width: 60px !important;
    height: 48px !important;
    border: none !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    background: #fff !important;
    -moz-appearance: textfield !important;
    padding: 0 !important;
    margin: 0 !important;
}

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

.sp-details .quantity input:focus {
    outline: none !important;
}

/* ── Add to Cart Button ── */
.sp-details .single_add_to_cart_button {
    flex: 1 !important;
    min-width: 160px !important;
    height: 48px !important;
    padding: 0 28px !important;
    background: #5c1e3a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background .2s, transform .1s !important;
}

.sp-details .single_add_to_cart_button:hover {
    background: #d4612b !important;
    transform: translateY(-1px) !important;
}

.sp-details .single_add_to_cart_button.disabled,
.sp-details .single_add_to_cart_button.wc-variation-selection-needed,
.sp-details .single_add_to_cart_button[disabled] {
    background: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Add to Cart */
.sp-atc-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.sp-qty {
    display: flex; align-items: center;
    border: 1.5px solid #e5e7eb; border-radius: 10px; overflow: hidden;
}
.sp-qty-btn {
    width: 40px; height: 48px; border: none; background: #f9fafb;
    font-size: 18px; cursor: pointer; color: #374151;
    transition: background .2s; display: flex; align-items: center; justify-content: center;
}
.sp-qty-btn:hover { background: #f3f4f6; }
.sp-qty input {
    width: 52px; height: 48px; border: none; border-left: 1.5px solid #e5e7eb;
    border-right: 1.5px solid #e5e7eb; text-align: center;
    font-size: 15px; font-weight: 700; color: #111827;
}
.sp-qty input:focus { outline: none; }
.sp-atc-btn {
    flex: 1; min-width: 160px; height: 48px;
    background: #5c1e3a; color: #fff; border: none;
    border-radius: 10px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all .2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sp-atc-btn:hover { background: #d4612b; transform: translateY(-1px); }
.sp-atc-btn:active { transform: translateY(0); }
.sp-atc-btn.loading { opacity: .75; pointer-events: none; }
.sp-atc-btn.loading::after {
    content: ''; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Wishlist / Compare */
.sp-secondary-btns {
    display: flex; gap: 10px;
    margin-top: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.sp-sec-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 16px; border: 1.5px solid #e5e7eb;
    border-radius: 8px; font-size: 13px; font-weight: 600;
    color: #374151; background: #fff; cursor: pointer; transition: all .2s;
    text-decoration: none;
}
.sp-sec-btn:hover { border-color: #5c1e3a; color: #5c1e3a; }
.sp-sec-btn.active { background: #fff7f4; border-color: #5c1e3a; color: #5c1e3a; }

/* Trust badges */
.sp-trust {
    display: flex; gap: 0;
    border: 1px solid #e5e7eb; border-radius: 12px;
    overflow: hidden; margin-bottom: 20px;
}
.sp-trust-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 5px; padding: 14px 8px;
    font-size: 12px; font-weight: 600; color: #374151;
    border-right: 1px solid #e5e7eb; text-align: center;
    background: #f9fafb;
}
.sp-trust-item:last-child { border-right: none; }
.sp-trust-item svg { color: #5c1e3a; }

/* ── Hide WC default compare link if plugin adds it ── */
.sp-details .compare,
.sp-details .woosq-btn,
.sp-details a.compare { display: none !important; }

/* ── WC default wishlist remove (we have custom) ── */
.sp-details .yith-wcwl-add-to-wishlist { display: none !important; }

/* Meta */
.sp-meta { font-size: 13px; color: #6b7280; display: flex; flex-direction: column; gap: 6px; }
.sp-meta span { color: #111827; font-weight: 500; }
.sp-meta a { color: #5c1e3a; text-decoration: none; }

/* ── TABS ── */
.sp-tabs { margin-bottom: 48px; }
.sp-tabs-nav {
    display: flex; gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0; overflow-x: auto;
}
.sp-tab-btn {
    padding: 14px 24px; border: none; background: none;
    font-size: 14px; font-weight: 600; color: #6b7280;
    cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -2px; white-space: nowrap; transition: all .2s;
}
.sp-tab-btn:hover { color: #5c1e3a; }
.sp-tab-btn.active { color: #5c1e3a; border-bottom-color: #5c1e3a; }
.sp-tab-panel {
    display: none; padding: 28px 0;
    animation: fadeIn .2s ease;
}
.sp-tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Description */
.sp-tab-panel--description { font-size: 15px; color: #374151; line-height: 1.8; }
.sp-tab-panel--description p { margin-bottom: 12px; }

/* Additional info table */
.sp-attr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sp-attr-table tr:nth-child(even) { background: #f9fafb; }
.sp-attr-table th, .sp-attr-table td { padding: 12px 16px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.sp-attr-table th { font-weight: 700; color: #374151; width: 35%; }
.sp-attr-table td { color: #4b5563; }

/* FAQ */
.sp-faq { display: flex; flex-direction: column; gap: 12px; }
.sp-faq-item { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.sp-faq-q {
    width: 100%; text-align: left; padding: 16px 20px;
    background: #f9fafb; border: none; font-size: 14px;
    font-weight: 700; color: #111827; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; transition: background .2s;
}
.sp-faq-q:hover { background: #f3f4f6; }
.sp-faq-q svg { flex-shrink: 0; transition: transform .25s; }
.sp-faq-item.open .sp-faq-q svg { transform: rotate(180deg); }
.sp-faq-a { display: none; padding: 16px 20px; font-size: 14px; color: #4b5563; line-height: 1.7; border-top: 1px solid #e5e7eb; }
.sp-faq-item.open .sp-faq-a { display: block; }

/* Reviews */
#reviews .woocommerce-Reviews-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* ── Related / Viewed ── */
.sp-section { margin-bottom: 48px; }
.sp-section-title {
    font-size: 22px; font-weight: 800; color: #111827;
    margin-bottom: 24px; display: flex; align-items: center; gap: 12px;
}
.sp-section-title::after {
    content: ''; flex: 1; height: 2px; background: linear-gradient(to right, #5c1e3a22, transparent);
}
.sp-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media(max-width:1024px){ .sp-related-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:700px)  { .sp-related-grid { grid-template-columns: repeat(2,1fr); gap:12px; } }
