/* ============================================================
   SHAPE Theme — Single Product Page CSS
   Add this to your theme's style.css or enqueue as a separate
   file via functions.php: wp_enqueue_style('shape-single-product', ...)
   ============================================================ */

/* ── Breadcrumb ── */
.woo-breadcrumb {
    font-size: .78rem;
    color: var(--sv-text-label);
    margin-bottom: 2rem;
}
.woo-breadcrumb a {
    color: var(--sv-primary-dark);
    text-decoration: none;
    transition: color .2s;
}
.woo-breadcrumb a:hover { color: var(--sv-primary); }
.woo-breadcrumb span   { margin: 0 .4rem; color: #ccc; }

/* ── Two-column product layout ── */
.single-product-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
    align-items: start;
}
@media (max-width: 900px) {
    .single-product-wrap { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Gallery ── */
.product-gallery { display: flex; flex-direction: column; gap: 1.5rem; }

.main-img-wrap {
    background: var(--sv-surface);
    border: 1px solid var(--sv-surface-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sv-shadow-card);
    aspect-ratio: 1 / 1;
}
.main-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .4s var(--sv-ease);
}
.main-img-wrap:hover img { transform: scale(1.05); }

.thumb-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.thumb-gallery img {
    width: 100%; aspect-ratio: 1 / 1;
    object-fit: cover; border-radius: 12px;
    cursor: pointer; opacity: .6;
    border: 2px solid transparent;
    transition: all .2s;
    background: var(--sv-surface);
}
.thumb-gallery img.active,
.thumb-gallery img:hover {
    opacity: 1;
    border-color: var(--sv-primary);
}

/* ── Product Info ── */
.product-summary h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: .5rem;
    color: var(--sv-text-dark);
}

.price-wrap {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sv-primary-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.price-wrap del   { color: #aaa; font-size: 1.1rem; font-weight: 500; }
.price-wrap ins   { text-decoration: none; }

/* WooCommerce injects .price — restyle it */
.product-summary .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sv-primary-dark);
    margin-bottom: 1.5rem;
    display: block;
}
.product-summary .price del   { color: #aaa; font-size: 1.1rem; font-weight: 500; }
.product-summary .price ins   { text-decoration: none; }
.product-summary .price .amount { color: inherit; }

.product-short-desc {
    font-size: 1.05rem; line-height: 1.7;
    color: var(--sv-text-muted); margin-bottom: 2rem;
}
.product-short-desc ul { padding-left: 1.5rem; margin: 1rem 0; }
.product-short-desc li { margin-bottom: .5rem; }

/* ── Add to Cart ── */
.add-to-cart-form {
    display: flex; gap: 1rem;
    margin-bottom: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Override WC quantity wrapper */
.add-to-cart-form .quantity { display: contents; }

.quantity-input,
.add-to-cart-form input[type="number"],
.add-to-cart-form input.qty {
    width: 70px; height: 48px;
    border: 1px solid var(--sv-border-light);
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem; font-weight: 600;
    font-family: 'Manrope', sans-serif;
    background: #fff;
    -moz-appearance: textfield;
}
.quantity-input:focus,
.add-to-cart-form input.qty:focus {
    outline: none;
    border-color: var(--sv-primary);
    box-shadow: 0 0 0 3px rgba(250,174,0,.2);
}
/* hide number spinner arrows */
.add-to-cart-form input[type="number"]::-webkit-inner-spin-button,
.add-to-cart-form input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }

.btn-cart,
.add-to-cart-form button[type="submit"],
.single_add_to_cart_button {
    background: var(--sv-primary);
    color: #111;
    border: none;
    height: 48px;
    padding: 0 2.5rem;
    border-radius: 12px;
    font-size: 1rem; font-weight: 700;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
    transition: all .2s var(--sv-ease);
    box-shadow: 0 8px 15px rgba(250,174,0,.3);
    flex-grow: 1;
    display: flex; justify-content: center; align-items: center; gap: 8px;
    text-decoration: none;
}
.btn-cart:hover,
.add-to-cart-form button[type="submit"]:hover,
.single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(250,174,0,.4);
    background: var(--sv-primary-dark);
    color: #fff;
}

/* Out of stock */
.out-of-stock-msg {
    background: #fef2f2; color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 12px; padding: .75rem 1.5rem;
    font-weight: 600; font-size: .95rem;
    margin-bottom: 2rem;
    display: inline-block;
}

/* Stock badge */
.stock-badge {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 20px;
    font-size: .75rem; font-weight: 700;
    letter-spacing: .4px; text-transform: uppercase;
}
.stock-badge.in-stock  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.stock-badge.out-of-stock { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ── Product Meta ── */
.product-meta {
    font-size: .85rem; color: var(--sv-text-label);
    border-top: 1px solid var(--sv-border-light);
    padding-top: 1.5rem;
    display: flex; flex-direction: column; gap: .75rem;
}
.product-meta span strong { color: var(--sv-text-main); font-weight: 600; }
.product-meta a { color: var(--sv-primary-dark); text-decoration: none; }
.product-meta a:hover { text-decoration: underline; }

/* ── Tabs ── */
.woo-tabs { margin-top: 2rem; margin-bottom: 5rem; }

.tab-nav {
    display: flex; gap: 2rem;
    border-bottom: 1px solid var(--sv-border-light);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.tab-nav button {
    background: none; border: none;
    font-size: 1.1rem; font-weight: 700;
    font-family: 'Manrope', sans-serif;
    color: var(--sv-text-label);
    padding-bottom: 1rem; cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all .2s;
    position: relative; top: 1px;
    white-space: nowrap;
}
.tab-nav button.active,
.tab-nav button:hover {
    color: var(--sv-primary-dark);
    border-bottom-color: var(--sv-primary);
}

.tab-content {
    display: none;
    font-size: 1rem; line-height: 1.7;
    color: var(--sv-text-muted);
    animation: spFadeIn .4s ease;
}
.tab-content.active { display: block; }

@keyframes spFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tab-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--sv-text-dark);
    margin-bottom: 1rem;
}

/* Spec table */
.shape-spec-table {
    width: 100%; border-collapse: collapse; margin-top: 1rem;
}
.shape-spec-table tr { border-bottom: 1px solid var(--sv-border-light); }
.shape-spec-table tr:last-child { border-bottom: none; }
.shape-spec-table td { padding: .75rem; vertical-align: top; }
.shape-spec-table td:first-child { width: 30%; font-weight: 600; color: var(--sv-text-dark); }

/* WooCommerce reviews styling overrides */
#reviews { color: var(--sv-text-muted); }
#reviews h2 { font-family: 'Playfair Display', serif; color: var(--sv-text-dark); font-size: 1.8rem; margin-bottom: 1rem; }
#reviews .comment-form-rating label { color: var(--sv-text-main); }
#reviews input[type="submit"] {
    background: var(--sv-primary); border: none;
    color: #111; font-weight: 700; font-family: 'Manrope', sans-serif;
    padding: .6rem 1.5rem; border-radius: 10px; cursor: pointer;
    transition: background .2s;
}
#reviews input[type="submit"]:hover { background: var(--sv-primary-dark); color: #fff; }

/* ── Related Products ── */
.related-header {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--sv-text-dark);
}

.woo-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1000px) { .woo-product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .woo-product-grid { grid-template-columns: 1fr; } }

.product-card {
    background: var(--sv-surface);
    border: 1px solid var(--sv-surface-border);
    border-radius: 16px; overflow: hidden;
    transition: transform .4s var(--sv-ease), box-shadow .4s, border-color .4s;
    text-decoration: none; color: var(--sv-text-main); display: block;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.06);
    border-color: var(--sv-primary);
}
.product-card-img { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #fafafa; }
.product-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s var(--sv-ease);
}
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-card-body { padding: 1rem 1.25rem 1.25rem; }
.product-card-name  { font-size: .92rem; font-weight: 600; margin-bottom: .4rem; line-height: 1.3; color: var(--sv-text-dark); }
.product-card-cat   { font-size: .72rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--sv-primary-dark); margin-bottom: .5rem; }
.product-card-price { font-size: .9rem; font-weight: 700; color: var(--sv-primary-dark); margin-bottom: .4rem; }
.product-card-price .amount { color: inherit; }
.product-card-action {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .78rem; font-weight: 700;
    color: var(--sv-primary-dark); transition: color .2s;
}
.product-card:hover .product-card-action { color: var(--sv-primary); }