/* Product Details Page Stylesheet */

.sp-details-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Breadcrumbs */
.sp-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 30px;
}

.sp-breadcrumbs a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.sp-breadcrumbs a:hover {
    color: var(--primary);
}

.sp-breadcrumbs span {
    font-weight: 500;
    color: var(--dark);
}

/* Product Info Section */
.sp-details-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

/* Left: Image Gallery */
.sp-gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sp-main-image {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sp-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sp-main-image:hover img {
    transform: scale(1.05);
}

.sp-thumbnails {
    display: flex;
    gap: 15px;
}

.sp-thumb {
    width: 80px;
    height: 80px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sp-thumb.active, .sp-thumb:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(229,72,77,0.1);
}

.sp-thumb img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* Right: Product Data */
.sp-info-wrap {
    display: flex;
    flex-direction: column;
}

.sp-info-cat {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sp-info-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    line-height: 1.3;
    margin: 0 0 15px 0;
}

.sp-info-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #f59e0b;
    margin-bottom: 25px;
}

.sp-info-rating span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    margin-left: 4px;
}

.sp-price-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.sp-price-big {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
}

.sp-price-old-big {
    font-size: 18px;
    color: var(--muted);
    text-decoration: line-through;
}

.sp-price-discount {
    background: #10b981;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.sp-info-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 30px;
}

.sp-actions-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 30px;
}

.sp-action-btns-row {
    display: flex;
    gap: 12px;
}

.sp-btn-cart,
.sp-btn-buy {
    flex: 1;
    justify-content: center;
}

.sp-qty-picker {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    height: 48px;
    background: #fff;
}

.sp-qty-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sp-qty-btn:hover {
    background: #f1f5f9;
}

.sp-qty-input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
    outline: none;
}

.sp-btn-cart {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    height: 48px;
    padding: 0 30px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.2s;
}

.sp-btn-cart:hover {
    opacity: 0.9;
}

.sp-btn-buy {
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    height: 48px;
    padding: 0 30px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sp-btn-buy:hover {
    opacity: 0.9;
}

/* Trust Badges */
.sp-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.sp-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.sp-trust-item i {
    color: var(--primary);
    font-size: 16px;
}

/* Tabs Panel */
.sp-tabs-section {
    margin-bottom: 60px;
}

.sp-tabs-nav {
    display: flex;
    border-bottom: 1.5px solid var(--border);
    gap: 30px;
    margin-bottom: 30px;
}

.sp-tab-trigger {
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--muted);
    padding: 12px 0;
    cursor: pointer;
    position: relative;
    outline: none;
}

.sp-tab-trigger.active {
    color: var(--primary);
}

.sp-tab-trigger.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.sp-tab-content {
    display: none;
    line-height: 1.6;
    color: var(--text);
    font-size: 15px;
}

.sp-tab-content.active {
    display: block;
}

/* Specs Table */
.sp-specs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
}

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

.sp-specs-table tr:nth-child(even) {
    background: #f8fafc;
}

.sp-specs-table td {
    padding: 14px 20px;
    font-size: 14px;
}

.sp-specs-table td.sp-spec-label {
    font-weight: 700;
    color: var(--dark);
    width: 250px;
    border-right: 1px solid var(--border);
}

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

/* Reviews List */
.sp-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sp-review-card {
    border-bottom: 1px solid var(--border);
    padding-bottom: 25px;
}

.sp-review-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sp-review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sp-reviewer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-rev-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark);
    font-size: 14px;
}

.sp-rev-name {
    font-weight: 800;
    color: var(--dark);
    font-size: 15px;
}

.sp-rev-stars {
    color: #f59e0b;
    font-size: 12px;
}

.sp-rev-date {
    font-size: 12px;
    color: var(--muted);
}

.sp-rev-comment {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    padding-left: 52px;
}

/* Related Products */
.sp-related-section {
    border-top: 1px solid var(--border);
    padding-top: 50px;
    margin-bottom: 40px;
}

.sp-related-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 30px;
}

.sp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Reuse / copy key parts of subcategory product cards styling */
.sp-related-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.sp-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.sp-related-card-img-wrap {
    height: 180px;
    background: #f8fafc;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-related-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.sp-related-card:hover .sp-related-card-img-wrap img {
    transform: scale(1.06);
}

.sp-related-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sp-related-card-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 6px;
}

.sp-related-card-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 8px 0;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
}

.sp-related-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.sp-related-card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
}

.sp-related-card-btn {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.sp-related-card-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Media Queries */
@media (max-width: 992px) {
    .sp-details-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .sp-main-image {
        height: 380px;
    }
    .sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .sp-main-image {
        height: 280px;
    }
    .sp-info-title {
        font-size: 22px;
    }
    .sp-actions-box {
        flex-direction: column;
        align-items: stretch;
    }
    .sp-qty-picker {
        justify-content: space-between;
    }
    .sp-btn-cart, .sp-btn-buy {
        justify-content: center;
    }
    .sp-trust-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .sp-related-card-img-wrap {
        height: 130px;
    }
    .sp-related-card-title {
        font-size: 12px;
        height: 34px;
    }
    .sp-related-card-price {
        font-size: 14px;
    }
    .sp-related-card-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    .sp-specs-table td.sp-spec-label {
        width: 120px;
        padding: 10px;
    }
    .sp-specs-table td {
        padding: 10px;
        font-size: 13px;
    }
    .sp-rev-comment {
        padding-left: 0;
        margin-top: 10px;
    }
}
