/**
 * Single Product Page Styles
 *
 * Mobile-first. Two-column layout with gallery, product info,
 * tabs, and related products.
 */

/* ==========================================================================
   SINGLE PRODUCT WRAPPER
   ========================================================================== */

div.single-product {
    padding: 24px 0 60px;
}

@media (min-width: 768px) {
    div.single-product {
        padding: 32px 0 80px;
    }
}

/* ==========================================================================
   TWO-COLUMN LAYOUT
   ========================================================================== */

.sp-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 48px;
}

@media (min-width: 1024px) {
    .sp-layout {
        flex-direction: row;
        gap: 48px;
        margin-bottom: 64px;
    }
}

/* ==========================================================================
   IMAGE GALLERY (left column)
   ========================================================================== */

.sp-gallery {
    width: 100%;
}

@media (min-width: 1024px) {
    .sp-gallery {
        width: 55%;
        flex-shrink: 0;
        position: sticky;
        top: calc(var(--header-height) + var(--top-bar-height) + 20px);
        align-self: flex-start;
    }
}

.sp-gallery__main {
    width: 100%;
    background: linear-gradient(180deg, var(--sky-pale) 0%, var(--sky-light) 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--sky-light);
}

.sp-gallery__img {
    display: block;
    width: 100%;
    height: auto;
}

.sp-gallery__placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-medium);
    text-align: center;
    padding: 20px;
}

/* Thumbnail Strip */
.sp-gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow: visible;
    padding-bottom: 4px;

}

@media (min-width: 640px) {
    .sp-gallery__thumbs {
        gap: 10px;
    }
}

.sp-gallery__thumb {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--sky-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sp-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-gallery__thumb.is-active,
.sp-gallery__thumb:hover {
    border-color: var(--ocean-mid);
    box-shadow: 0 2px 8px rgba(27, 107, 147, 0.15);
}

.sp-gallery__thumb--placeholder {
    background: var(--sky-pale);
    border: 2px solid var(--sky-light);
    cursor: default;
}

.sp-gallery__thumb--placeholder span {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .sp-gallery__thumb {
        width: 80px;
        height: 80px;
    }
}

/* ==========================================================================
   PRODUCT INFO (right column)
   ========================================================================== */

.sp-info {
    flex: 1;
    min-width: 0;
}

/* Series Label */
.sp-info__series {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    color: var(--white);
    background: var(--ocean-deep);
}

.sp-info__series--dryrun-waterproof {
    background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean-mid) 100%);
}

.sp-info__series--sunbrella-canvas {
    background: linear-gradient(135deg, #1E3A5F 0%, #3A5A7A 100%);
}

.sp-info__series--sunwashed-canvas {
    background: linear-gradient(135deg, #6A8AAA 0%, #8AAACA 100%);
}

/* Title */
.sp-info__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.15;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .sp-info__title {
        font-size: 34px;
    }
}

.sp-info__subtitle {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 16px;
}

/* Rating */
.sp-info__rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.sp-stars {
    display: flex;
    gap: 2px;
}

.sp-star--filled {
    color: #F5A623;
}

.sp-star--empty {
    color: var(--ocean-pale);
}

.sp-info__rating-text {
    font-size: 13px;
    color: var(--text-medium);
}

/* Price */
.sp-info__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sky-light);
}

.sp-info__price-amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
}

.sp-info__price-amount del {
    color: var(--text-light);
    font-weight: 400;
    font-size: 20px;
}

.sp-info__price-amount ins {
    text-decoration: none;
    color: var(--coral-accent);
}

.sp-info__price-shipping {
    font-size: 13px;
    color: var(--color-success);
    font-weight: 600;
}

/* ==========================================================================
   ADD TO CART FORM (WooCommerce form styles)
   ========================================================================== */

.sp-info__cart-form {
    margin-bottom: 16px;
}

/* Style WC variation table */
.sp-info__cart-form .variations {
    width: 100%;
    margin-bottom: 16px;
    border: none;
}

.sp-info__cart-form .variations td,
.sp-info__cart-form .variations th {
    border: none;
    padding: 8px 0;
}

.sp-info__cart-form .variations .label label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sp-info__cart-form .variations select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ocean-pale);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235A7A8A' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.sp-info__cart-form .variations select:focus {
    outline: none;
    border-color: var(--ocean-mid);
    box-shadow: 0 0 0 3px rgba(46, 151, 203, 0.15);
}

/* Quantity selector */
.sp-info__cart-form .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--ocean-pale);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-right: 12px;
}

.sp-info__cart-form .quantity .qty {
    width: 50px;
    text-align: center;
    border: none;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 4px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.sp-info__cart-form .quantity .qty::-webkit-outer-spin-button,
.sp-info__cart-form .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart button — purple CTA */
.sp-info__cart-form .single_add_to_cart_button,
.sp-info__cart-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--dureva-purple) 0%, var(--dureva-magenta) 100%);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-button);
    cursor: pointer;
    box-shadow: var(--shadow-button-purple);
    transition: all var(--transition-smooth);
}

.sp-info__cart-form .single_add_to_cart_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(123, 63, 158, 0.4);
}

/* WC variation reset link */
.sp-info__cart-form .reset_variations {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 8px;
}

/* Extra Actions (Buy Now + Size Guide) */
.sp-info__extra-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--sky-light);
}

.sp-buy-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: 2px solid var(--ocean-deep) !important;
    border-radius: var(--radius-button);
    color: var(--ocean-deep);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--white);
    transition: all var(--transition-smooth);
}

.sp-buy-now:hover {
    background: var(--sky-light);
    color: var(--ocean-deep);
}

.sp-size-guide-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--ocean-mid);
    text-decoration: underline;
}

/* ==========================================================================
   PRODUCT HIGHLIGHTS
   ========================================================================== */

.sp-highlights {
    margin-bottom: 0;
}

.sp-highlights__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.sp-highlights__list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sp-highlights__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.5;
}

.sp-highlights__check {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==========================================================================
   TABS SECTION
   ========================================================================== */

.sp-tabs {
    margin-bottom: 60px;
}

/* Tab Navigation */
.sp-tabs__nav {
    display: flex;
    overflow: visible;
    border-bottom: 2px solid var(--sky-light);
    margin-bottom: 32px;
    gap: 0;

}

.sp-tabs__btn {
    flex-shrink: 0;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.sp-tabs__btn:hover {
    color: var(--text-dark);
}

.sp-tabs__btn.is-active {
    color: var(--ocean-deep);
    border-bottom-color: var(--ocean-deep);
}

/* Tab Panels */
.sp-tabs__panel {
    display: none;
}

.sp-tabs__panel.is-active {
    display: block;
}

.sp-tabs__panel h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.sp-tabs__description p {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1em;
}

.sp-tabs__feature-list {
    list-style: disc;
    padding-left: 20px;
}

.sp-tabs__feature-list li {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 8px;
}

/* Feature Cards (2x2 grid in description tab) */
.sp-feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.sp-feature-card {
    background: var(--sky-pale);
    border-radius: var(--radius-card);
    padding: 24px 20px;
    text-align: center;
    transition: all var(--transition-smooth);
}

.sp-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.sp-feature-card__icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.sp-feature-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.sp-feature-card p {
    font-size: 12px;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Specifications Table */
.sp-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.sp-specs-table tr {
    border-bottom: 1px solid var(--sky-light);
}

.sp-specs-table th,
.sp-specs-table td {
    padding: 14px 16px;
    font-size: 14px;
    text-align: left;
}

.sp-specs-table th {
    width: 35%;
    font-weight: 700;
    color: var(--text-dark);
    background: var(--sky-pale);
}

.sp-specs-table td {
    color: var(--text-medium);
}

/* ==========================================================================
   RELATED PRODUCTS
   ========================================================================== */

.sp-related {
    padding-top: 40px;
    border-top: 2px solid var(--sky-light);
}

.sp-related__header {
    margin-bottom: 24px;
}

.sp-related__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

@media (min-width: 768px) {
    .sp-related__title {
        font-size: 28px;
    }
}

.sp-related__subtitle {
    font-size: 15px;
    color: var(--text-medium);
    font-family: var(--font-accent);
    font-style: italic;
}

.product-grid--4-related {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .product-grid--4-related {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.sp-related__card {
    background: var(--white);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--sky-light);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-smooth);
    text-decoration: none;
    display: block;
}

.sp-related__card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--ocean-pale);
}

.sp-related__image {
    aspect-ratio: 3 / 2;
    background: linear-gradient(180deg, var(--sky-pale) 0%, var(--sky-light) 100%);
    overflow: hidden;
}

.sp-related__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sp-related__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-medium);
    text-align: center;
    padding: 12px;
}

.sp-related__info {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sp-related__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.sp-related__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--ocean-deep);
}

/* ==========================================================================
   MOBILE TABS → ACCORDION
   ========================================================================== */

@media (max-width: 767px) {
    .sp-tabs__nav {
        flex-direction: column;
        border-bottom: none;
        gap: 0;
    }

    .sp-tabs__btn {
        text-align: left;
        border-bottom: 1px solid var(--sky-light);
        margin-bottom: 0;
        padding: 14px 0;
    }

    .sp-tabs__btn.is-active {
        border-bottom-color: var(--sky-light);
        color: var(--ocean-deep);
    }

    .sp-tabs__btn::after {
        content: "+";
        float: right;
        font-size: 18px;
        font-weight: 300;
        color: var(--text-light);
    }

    .sp-tabs__btn.is-active::after {
        content: "\2212";
        color: var(--ocean-deep);
    }
}
.stock { display: none !important; }
.sp-gallery__thumbs { overflow: hidden; max-width: 100%; }

.sp-info__cart-form .reset_variations {
    display: none !important;
}

