/* ==============================================
   Single Product Page — single-product.css
   ============================================== */

.single-product-template {
    background: #f5f5f5;
    padding: 40px 0 60px;
}
.sp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.sp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
/* .sp-gallery {
    position: sticky;
    top: 100px;
} */
.sp-no-image {
    background: #f0f0f0;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    border-radius: 4px;
}
.sp-single-image {
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #eee;
}
.sp-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sp-carousel {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 4px;
    overflow: hidden;
    background: #111;
    user-select: none;
}
.sp-carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}
.sp-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.sp-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.sp-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.85);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.2s;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.sp-arrow:hover { background: #fff; }
.sp-prev { left: 10px; }
.sp-next { right: 10px; }
.sp-dots {
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.sp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.sp-dot.active {
    background: #fff;
    transform: scale(1.3);
}
.sp-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 20px;
    z-index: 10;
}
.sp-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.sp-thumbs::-webkit-scrollbar { height: 4px; }
.sp-thumbs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.sp-thumb {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    overflow: hidden;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
}
.sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sp-thumb.active,
.sp-thumb:hover {
    border-color: #1a6fad;
}

/* ================================================
   RIGHT — Content
   ================================================ */
.sp-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sp-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    padding-bottom: 14px;
    border-bottom: 3px solid #e8b800;
}

.sp-description {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}
.sp-description p { margin: 0 0 12px; }

/* ================================================
   Spec Table
   ================================================ */
.sp-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 24px;
}

.sp-spec-table thead tr {
    background: #d9edf7;
}

.sp-spec-table thead th {
    padding: 11px 16px;
    text-align: left;
    font-weight: 700;
    color: #1a1a1a;
    border: 1px solid #c5dff0;
}

.sp-spec-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
    transition: background 0.15s;
}

.sp-spec-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.sp-spec-table tbody tr:hover {
    background: #f0f7ff;
}

.sp-spec-table tbody td {
    padding: 10px 16px;
    color: #333;
    border: 1px solid #e8e8e8;
    vertical-align: top;
    line-height: 1.6;
}
.sp-spec-table tbody td:first-child {
    color: #555;
    font-weight: 500;
    white-space: nowrap;
    width: 25%;
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 900px) {
    .sp-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 20px;
    }
.sp-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0px;
}
.single-product-template {
    background: #f5f5f5;
    padding: 30px 0 30px;
}
    .sp-gallery { position: static; }
}

@media (max-width: 480px) {
    .sp-title { font-size: 20px; }
    .sp-arrow { width: 30px; height: 30px; font-size: 18px; }
    .sp-thumb { width: 54px; height: 54px; }
}