/* =====================================================
   GLOBAL THEME
===================================================== */
:root {
    --primary-neon: #00d2ff;
    --dark-bg: #0b0e14;
    --card-bg: rgba(15, 20, 28, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: url('../../img/bg/admin-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at center,
        rgba(11, 14, 20, 0.7) 0%,
        rgba(5, 7, 10, 0.95) 100%
    );
    z-index: -1;
}

/* =====================================================
   LAYOUT
===================================================== */
.main-container {
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.detail-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* =====================================================
   GRID
===================================================== */
.detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.product-gallery,
.product-info {
    flex: 1;
    min-width: 300px;
}

/* =====================================================
   GALLERY – SWIPE READY (NO JS)
===================================================== */
.product-gallery {
    overflow: hidden;
}

/* MAIN IMAGE */
.main-image {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.main-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform .3s ease;
}

/* THUMBNAIL SWIPE */
.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}

.thumbnail-list::-webkit-scrollbar {
    height: 4px;
}

.thumbnail-list::-webkit-scrollbar-thumb {
    background: var(--primary-neon);
    border-radius: 10px;
}

.thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    opacity: .6;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
    scroll-snap-align: center;
}

.thumb.active,
.thumb:hover {
    opacity: 1;
    border-color: var(--primary-neon);
}

/* =====================================================
   LIGHTBOX ZOOM (CSS ONLY)
===================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: .3s ease;
    z-index: 999;
}

.lightbox img {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0,210,255,.3);
}

.lightbox:target {
    opacity: 1;
    pointer-events: auto;
}

/* =====================================================
   PRODUCT INFO
===================================================== */
.product-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.product-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-neon);
    margin-bottom: 20px;
}

/* =====================================================
   INTERACTION ROW
===================================================== */
.interaction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
    gap: 12px;
}

.share-group {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.share-btn.fb { background:#1877f2; }
.share-btn.tg { background:#229ed9; }
.share-btn.x  { background:#000; }
.share-btn.copy { background:#666; }

.visitor-stat {
    font-size: .9rem;
    font-weight: 700;
    color: var(--primary-neon);
}

/* =====================================================
   BUY BUTTON
===================================================== */
.btn-buy {
    width: 80%;
    display: block;
    margin-top: 20px;
    background: linear-gradient(135deg,#25d366,#128c7e);
    padding: 15px;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,210,255,.3);
}

/* =====================================================
   SPEC
===================================================== */
.spec-box {
    margin-top: 40px;
}

.spec-box pre {
    background: rgba(0,0,0,.4);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    white-space: pre-wrap;
}

/* =====================================================
   TABLET
===================================================== */
@media (max-width: 900px) {
    .detail-grid { gap: 24px; }
    .main-image img { max-height: 320px; }
}

/* =====================================================
   MOBILE
===================================================== */
@media (max-width: 576px) {

    .main-container { padding: 12px; }
    .detail-wrapper { padding: 16px; }

    .detail-grid {
        flex-direction: column;
    }

    .main-image img {
        max-height: 240px;
    }

    .thumb {
        width: 48px;
        height: 48px;
    }

    .product-title {
        font-size: 1.3rem;
    }

    .product-price {
        font-size: 1.8rem;
    }

    .interaction-row {
        flex-direction: column;
        text-align: center;
    }

    .btn-buy {
        width: 100%;
        font-size: .95rem;
    }

    .spec-box pre {
        font-size: .85rem;
    }
}

/* =====================================================
   EXTRA SMALL (iPhone SE / Android 360px)
===================================================== */
@media (max-width: 360px) {

    .main-image img {
        max-height: 200px;
    }

    .thumb {
        width: 40px;
        height: 40px;
    }

    .product-title {
        font-size: 1.1rem;
    }

    .product-price {
        font-size: 1.5rem;
    }
}
