:root {
    --sp-red: #ee4d2d;
    --sp-red-hover: #d0011b;
    --sp-gray: #757575;
    --sp-bg: #f5f5f5;
    --sp-card-bg: #ffffff;
    --sp-border-color: #f2f2f2;
}

.sp-full-container {
    font-family: 'Kanit', sans-serif;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Breadcrumb */
.sp-breadcrumb {
    font-size: 13px;
    color: #555;
    margin-bottom: 20px;
}
.sp-breadcrumb a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}
.sp-breadcrumb a:hover {
    color: var(--sp-red);
}
.sp-breadcrumb span {
    color: #000;
    font-weight: 400;
}

/* Layout Main Card */
.sp-main-card {
    background: var(--sp-card-bg);
    display: flex;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    gap: 40px;
}

.sp-left {
    flex: 0 0 450px;
    width: 450px;
    max-width: 100%;
    min-width: 0;
}

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

/* Gallery & Slider */
.sp-gallery-main {
    border: 1px solid var(--sp-border-color);
    border-radius: 2px;
    overflow: hidden;
}
.sp-gallery-main img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.sp-gallery-main img:hover {
    transform: scale(1.02);
}

.sp-thumb-wrapper {
    position: relative;
    margin-top: 12px;
    padding: 0 35px;
}

.sp-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}
.sp-thumbnails::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 2px;
    overflow: hidden;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}
.thumb-item:hover {
    opacity: 0.8;
}
.thumb-item.active {
    border-color: var(--sp-red);
}
.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.25);
    color: #fff;
    border: none;
    width: 25px;
    height: 40px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s;
    border-radius: 2px;
}
.sp-nav:hover {
    background: rgba(0,0,0,0.6);
}
.sp-nav.prev {
    left: 5px;
}
.sp-nav.next {
    right: 5px;
}

/* Share & Favorite */
.sp-share-fav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    font-size: 14px;
    border-top: 1px solid var(--sp-border-color);
    padding-top: 15px;
}
.sp-share-fav .share {
    color: #222;
}
.sp-share-fav i {
    margin-left: 8px;
    font-size: 18px;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.sp-share-fav i:hover {
    transform: scale(1.15);
}
.sp-share-fav .fav {
    color: var(--sp-gray);
    cursor: pointer;
    transition: color 0.2s;
}
.sp-share-fav .fav:hover {
    color: var(--sp-red);
}

/* Right Details */
.badge-mall {
    background: var(--sp-red);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 2px;
    position: relative;
    top: -2px;
    text-transform: uppercase;
}

.sp-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 15px;
    color: #222;
}

.sp-stats-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    flex-wrap: wrap;
}
.divider {
    width: 1px;
    height: 12px;
    background: #ddd;
}
.rating u {
    color: var(--sp-red);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--sp-red);
}
.stars {
    color: var(--sp-red);
    font-size: 12px;
    margin-left: 3px;
}
.report-btn {
    margin-left: auto;
    color: var(--sp-gray);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}
.report-btn:hover {
    color: #222;
}

/* Price Box */
.sp-price-box {
    background: #fafafa;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border-radius: 2px;
}
.old-price {
    text-decoration: line-through;
    color: #929292;
    font-size: 16px;
}
.current-price {
    color: var(--sp-red);
    font-size: 30px;
    font-weight: 500;
}
.discount-tag {
    background: var(--sp-red);
    color: #fff;
    font-size: 10px;
    padding: 1px 4px;
    font-weight: 500;
    border-radius: 2px;
}

/* Rows styling */
.sp-row {
    display: flex;
    margin-bottom: 22px;
    align-items: flex-start;
    font-size: 14px;
}
.sp-row .label {
    width: 110px;
    color: var(--sp-gray);
    flex-shrink: 0;
}
.sp-row .content {
    flex: 1;
    color: #222;
}

.v-tag {
    background: #fff5f1;
    border: 1px solid var(--sp-red);
    color: var(--sp-red);
    font-size: 12px;
    padding: 2px 8px;
    margin-right: 10px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 400;
}

.show-all {
    color: var(--sp-red);
    font-size: 12px;
    cursor: pointer;
}

.ship-line {
    margin-bottom: 5px;
}
.ship-line i {
    color: #00bfa5;
    margin-right: 5px;
}
.free-ship {
    color: #26aa99;
    font-weight: 400;
}
.gray {
    color: var(--sp-gray);
    font-size: 13px;
}

/* Qty and Actions */
.qty-flex {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.qty-control {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 2px;
    overflow: hidden;
}
.qty-control button {
    width: 32px;
    height: 32px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    transition: background 0.2s;
}
.qty-control button:hover {
    background: #f5f5f5;
}
.qty-control input {
    width: 50px;
    text-align: center;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-top: none;
    border-bottom: none;
    background: #fff;
    font-size: 14px;
    color: #222;
}
.stock-label {
    color: var(--sp-gray);
    font-size: 13px;
}

/* Buttons styling */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-add-cart {
    background: rgba(238, 77, 45, 0.08) !important;
    color: var(--sp-red) !important;
    border: 1px solid var(--sp-red) !important;
    height: 48px;
    padding: 0 20px;
    flex: 1;
    border-radius: 2px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 400;
}
.btn-add-cart:hover {
    background: rgba(238, 77, 45, 0.15) !important;
}
.btn-add-cart i {
    margin-right: 8px;
}

.btn-buy-now {
    background: var(--sp-red) !important;
    color: #fff !important;
    border: none !important;
    height: 48px;
    flex: 1.5;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.2s;
}
.btn-buy-now:hover {
    background: var(--sp-red-hover) !important;
}
.btn-buy-now .b-text {
    font-size: 14px;
}
.btn-buy-now .b-price {
    font-size: 18px;
    font-weight: 500;
}

/* Media Queries */
@media (max-width: 1024px) {
    .sp-main-card {
        gap: 30px;
        padding: 15px;
    }
    .sp-left {
        flex: 0 0 380px;
        width: 380px;
    }
    .current-price {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .sp-full-container {
        padding: 0;
        margin: 20px auto;
    }
    .sp-breadcrumb {
        font-size: 11px;
        margin-bottom: 10px;
        padding: 10px;
        overflow-x: auto;
        white-space: nowrap;
    }
    .sp-main-card {
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: none;
    }
    .sp-left {
        flex: none;
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
    .sp-right {
        flex: none;
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }
    .sp-nav {
        display: none;
    }
    .sp-thumbnails {
        gap: 8px;
        margin-top: 8px;
        padding-bottom: 5px;
    }
    .thumb-item {
        width: 60px;
        height: 60px;
    }
    .sp-share-fav {
        font-size: 12px;
        margin-top: 15px;
    }
    .sp-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .sp-stats-bar {
        font-size: 12px;
        gap: 10px;
    }
    .sp-price-box {
        padding: 12px 15px;
        margin-bottom: 15px;
        gap: 10px;
    }
    .current-price {
        font-size: 24px;
    }
    .sp-row {
        flex-direction: column;
        font-size: 13px;
        margin-bottom: 15px;
    }
    .sp-row .label {
        width: 100%;
        margin-bottom: 8px;
        font-weight: 500;
    }
    .button-group {
        gap: 10px;
        margin-top: 15px;
    }
    .btn-add-cart {
        height: 44px;
        font-size: 13px;
    }
    .btn-buy-now {
        height: 44px;
    }
}

@media (max-width: 480px) {
    .thumb-item {
        width: 55px;
        height: 55px;
    }
    .button-group {
        flex-direction: column;
    }
    .btn-add-cart, .btn-buy-now {
        width: 100%;
        flex: none;
    }
}
