/* ---------- Product detail view ---------- */
.detail-view {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #cfd6de;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.detail-back:hover {
    color: #4fc3ff;
    border-color: rgba(79, 195, 255, 0.4);
    background: rgba(79, 195, 255, 0.08);
}

.product-page-container {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 36px;
    padding: 28px;
    background: rgba(10, 20, 28, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(14px);
}

@media (max-width: 900px) {
    .product-page-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px;
    }
}

/* ---------- Media gallery ---------- */
.product-media-section {
    min-width: 0;
}

.main-display {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-display img,
.main-display video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.main-display.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0f1620 25%, #1a232e 50%, #0f1620 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
    z-index: 2;
}

@keyframes skeleton-pulse {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.thumbnail-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .thumbnail-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.thumb {
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.thumb:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.thumb.active {
    border-color: #4fc3ff;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumb img.loaded {
    opacity: 1;
}

.thumb i {
    font-size: 1.1rem;
    color: #4fc3ff;
}

/* ---------- Info section ---------- */
.product-info-section {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.product-info-section h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: #fff;
    letter-spacing: -0.01em;
    font-weight: 600;
}

.price-display {
    font-size: 1.6rem;
    color: #4fc3ff;
    font-weight: 700;
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}

.field-label {
    display: block;
    color: #8792a0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.variant-row {
    margin-bottom: 16px;
}

.method-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-btn {
    padding: 10px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: #9aa6b2;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.9rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-btn:hover:not(:disabled):not(.active) {
    color: #e8edf2;
    background: rgba(255, 255, 255, 0.04);
}

.toggle-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.toggle-btn.active {
    background: #4fc3ff;
    color: #0a1016;
    box-shadow: 0 4px 14px rgba(79, 195, 255, 0.25);
}

.product-description {
    line-height: 1.6;
    color: #cfd6de;
    margin: 10px 0 22px;
    font-size: 0.95rem;
}

.whats-included {
    margin-bottom: 20px;
}

.included-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.included-list li {
    font-size: 0.85rem;
    color: #cfd6de;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
}

.included-list li::before {
    content: "✓";
    color: #4fc3ff;
    font-weight: bold;
}

@media (max-width: 600px) {
    .included-list {
        grid-template-columns: 1fr;
    }
}

/* ---------- Checkout controls ---------- */
.checkout-controls {
    background: rgba(255, 255, 255, 0.02);
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

.qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #cfd6de;
    font-size: 0.9rem;
}

.qty-row input {
    width: 64px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px;
    border-radius: 7px;
    text-align: center;
    font-family: inherit;
}

.qty-row input:focus {
    outline: none;
    border-color: #4fc3ff;
}

.buy-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: #4fc3ff;
    border: none;
    border-radius: 10px;
    color: #0a1016;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-family: inherit;
}

.buy-btn:hover:not(:disabled) {
    background: #71d0ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 195, 255, 0.25);
}

.buy-btn:disabled {
    background: #2a3744;
    color: #6b7682;
    cursor: not-allowed;
}

.buy-btn--preorder {
    background: #ff9f43;
    color: #1a1206;
}

.buy-btn--preorder:hover:not(:disabled) {
    background: #ffb366;
    box-shadow: 0 8px 24px rgba(255, 159, 67, 0.25);
}

/* ---------- Pre-order panel ---------- */
.preorder-panel {
    margin-top: 14px;
    padding: 14px;
    background: rgba(255, 159, 67, 0.07);
    border: 1px solid rgba(255, 159, 67, 0.25);
    border-radius: 12px;
    animation: fadeIn 0.2s ease-out;
}

.preorder-panel .field-label {
    color: #ffb677;
    margin-bottom: 10px;
}

.preorder-input-row {
    display: flex;
    gap: 8px;
}

.preorder-input-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
}

.preorder-input-row input:focus {
    outline: none;
    border-color: #ff9f43;
}

.preorder-submit {
    padding: 10px 18px;
    background: #ff9f43;
    color: #1a1206;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.preorder-submit:hover:not(:disabled) {
    background: #ffb366;
    transform: translateY(-1px);
}

.preorder-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.preorder-note {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #8a7a63;
}
