:root {
    /* Premium Palette - True Gold & Deep Black */
    --bg-dark: #050505;
    --bg-card: #0f0f0f;
    --bg-subtle: #1a1a1a;
    --text-main: #f5f5f5;
    --text-muted: #888888;

    /* True Gold */
    --gold: #D4AF37;
    --gold-hover: #F4C430;
    --gold-dim: #8a7122;

    --danger: #e74c3c;
    --success: #2ecc71;

    /* Modern Typography */
    --font-heading: 'Inter', sans-serif;
    /* Cleaner look */
    --font-body: 'Inter', sans-serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* Deeper shadow */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-dim);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Mobile optimization */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    /* Base size for mobile readable */
    width: 100%;
    max-width: 100vw;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

.gold-text {
    color: var(--gold);
}

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

/* Header */
.main-header {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: 1px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin-left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-btn:hover {
    color: var(--gold);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-dim);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.product-image-container {
    height: 300px;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.product-type {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-price {
    font-size: 1.25rem;
    color: var(--gold);
    font-weight: 700;
    margin-top: auto;
}

/* Buttons */
.btn-primary {
    background-color: var(--gold);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: var(--gold-hover);
    transform: scale(1.02);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-md);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--gold-dim);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 1rem;
}

/* Product Page */
.pdp-wrapper {
    padding: 60px 0;
}

.back-btn {
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
}

.product-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.product-gallery {
    flex: 1;
    min-width: 350px;
}

.main-image-frame {
    width: 100%;
    aspect-ratio: 1;
    background: #0f0f0f;
    border: 1px solid var(--bg-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.pdp-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto;
}

.thumb {
    width: 80px;
    height: 80px;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.product-info-detail {
    flex: 1;
    min-width: 350px;
}

.product-badge {
    background: var(--bg-subtle);
    color: var(--gold);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pdp-title {
    font-size: 2.5rem;
    margin: 15px 0;
    line-height: 1.2;
}

.price-block {
    margin: 30px 0;
    padding: 20px;
    background: rgba(212, 175, 55, 0.05);
    border-left: 4px solid var(--gold);
    border-radius: 0 8px 8px 0;
}

.price-old {
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.price-new {
    color: var(--gold);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.price-savings {
    color: var(--success);
    font-size: 0.9rem;
    margin-top: 10px;
}

.price-installments {
    color: #aaa;
    margin-top: 5px;
    font-size: 0.9rem;
}

.option-group {
    margin-bottom: 30px;
}

.option-label {
    margin-bottom: 10px;
    font-weight: 600;
}

.voltage-options {
    display: flex;
    gap: 15px;
}

.radio-box {
    display: block;
    position: relative;
    cursor: pointer;
}

.radio-box input {
    position: absolute;
    opacity: 0;
}

.radio-tile {
    display: block;
    padding: 12px 25px;
    border: 1px solid #333;
    border-radius: 6px;
    transition: all 0.2s;
}

.radio-box input:checked+.radio-tile {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.radio-tile:hover {
    border-color: #666;
}

.action-buttons {
    margin-bottom: 40px;
}

.buy-now-btn {
    padding: 18px 40px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.pdp-tabs {
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

.tab-btn {
    background: none;
    border: none;
    color: #888;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s, border-color 0.3s;
}

.tab-btn.active {
    color: white;
    border-bottom-color: var(--gold);
}

.tab-content {
    line-height: 1.8;
    color: #ccc;
    font-size: 1rem;
    animation: fadeIn 0.3s ease;
}

.specs-title {
    color: white;
    margin-bottom: 15px;
}

.specs-list {
    list-style: none;
    padding: 0;
}

.spec-item {
    padding: 10px 0;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
}

.spec-key {
    color: var(--gold);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Rating Stars */
.rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star {
    color: var(--gold);
    font-size: 0.9rem;
}

.star.empty {
    color: #444;
}

.rating-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 8px;
}

/* Badges */
.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-bestseller {
    background: linear-gradient(135deg, var(--gold) 0%, #c9a227 100%);
    color: #000;
}

.badge-premium {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: var(--gold);
    border: 1px solid var(--gold-dim);
}

.badge-freeshipping {
    background: var(--success);
    color: #fff;
}

.badge-promo {
    background: var(--danger);
    color: #fff;
}

/* Trust Indicators */
.trust-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--bg-subtle);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.trust-badge svg {
    color: var(--gold);
    width: 18px;
    height: 18px;
}

.trust-badge span {
    font-weight: 500;
}

/* Delivery Info */
.delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--success);
}

.delivery-info svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Stock Status */
.stock-status {
    font-size: 0.85rem;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-status.in-stock {
    color: var(--success);
}

.stock-status.low-stock {
    color: #f39c12;
}

.stock-status.out-of-stock {
    color: var(--danger);
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Enhanced Product Card */
.product-card {
    position: relative;
    transition: var(--transition), box-shadow 0.3s;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, transparent 0%, transparent 50%, var(--gold-dim) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
}

/* Premium Price Enhancement */
.price-block {
    position: relative;
    overflow: hidden;
}

.price-block::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.05));
    pointer-events: none;
}

/* Responsive & Mobile Optimization */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px 0;
    }

    .product-image-container {
        height: 160px;
    }

    .product-title {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .product-type {
        font-size: 0.7rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .product-info {
        padding: 12px;
    }

    .product-badges {
        gap: 4px;
        margin-bottom: 6px;
    }

    .badge {
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .btn-primary {
        padding: 10px 12px;
        font-size: 0.8rem;
        margin-top: 10px;
    }

    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    .logo {
        font-size: 1.2rem;
    }

    .main-nav {
        display: flex;
        align-items: center;
    }

    #my-orders-btn {
        display: none;
    }

    .modal-content {
        width: 100%;
        max-width: 100vw;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        border: none;
        padding: 15px;
        margin: 0;
        position: absolute;
        left: 0;
        top: 0;
    }

    .modal-content form {
        overflow-y: auto;
        padding-bottom: 100px;
    }

    /* Promo Page Mobile */
    .promo-product {
        flex-direction: column;
        gap: 20px !important;
    }

    .promo-details h2 {
        font-size: 1.5rem !important;
    }

    .promo-banner h1 {
        font-size: 1.5rem !important;
    }

    /* Mobile Inputs - Prevent Zoom */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    select {
        font-size: 16px !important;
        padding: 12px 10px !important;
    }

    .btn-primary,
    .btn-outline {
        padding: 14px !important;
        font-size: 1rem !important;
        min-height: 48px;
    }

    /* === FIXED: Product Detail Page Mobile === */
    .pdp-wrapper {
        padding: 15px 0;
    }

    .back-btn {
        margin-bottom: 15px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .product-detail-container {
        flex-direction: column;
        gap: 20px;
    }

    /* CRITICAL FIX: Remove min-width that causes horizontal overflow */
    .product-gallery {
        min-width: unset !important;
        width: 100% !important;
    }

    .product-info-detail {
        min-width: unset !important;
        width: 100% !important;
    }

    .main-image-frame {
        border-radius: 8px;
    }

    .pdp-main-img {
        padding: 10px;
    }

    .thumbnails {
        gap: 8px;
        margin-top: 12px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    .thumb {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .gallery-nav {
        padding: 8px;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gallery-nav.prev {
        left: 5px;
    }

    .gallery-nav.next {
        right: 5px;
    }

    .product-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .pdp-title {
        font-size: 1.4rem;
        margin: 12px 0;
        line-height: 1.3;
    }

    .price-block {
        margin: 20px 0;
        padding: 15px;
    }

    .price-old {
        font-size: 0.95rem;
    }

    .price-new {
        font-size: 1.8rem;
    }

    .price-savings {
        font-size: 0.8rem;
    }

    .price-installments {
        font-size: 0.85rem;
    }

    .option-group {
        margin-bottom: 20px;
    }

    .option-label {
        font-size: 0.9rem;
    }

    .voltage-options {
        gap: 10px;
    }

    .radio-tile {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .action-buttons {
        margin-bottom: 25px;
    }

    .buy-now-btn {
        max-width: 100%;
        padding: 16px;
        font-size: 1rem;
    }

    .pdp-tabs {
        gap: 15px;
        margin-bottom: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        font-size: 0.9rem;
        padding: 8px 0;
        white-space: nowrap;
    }

    .tab-content {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .specs-title {
        font-size: 1rem;
    }

    .spec-item {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
    }

    .spec-key {
        font-size: 0.85rem;
    }

    .spec-value {
        font-size: 0.9rem;
    }

    /* Trust Badges Mobile */
    .trust-badges {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .trust-badge {
        font-size: 0.8rem;
    }

    .delivery-info {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Rating Mobile */
    .rating-stars {
        gap: 1px;
    }

    .star {
        font-size: 0.8rem;
    }

    .rating-text {
        font-size: 0.75rem;
    }

    /* Hero Mobile */
    .hero-section {
        height: 40vh !important;
        min-height: 250px;
    }

    .hero-section h1 {
        font-size: 2rem !important;
    }

    .hero-section p {
        font-size: 0.95rem !important;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .container {
        padding: 0 10px;
    }

    .product-grid {
        gap: 8px;
    }

    .product-image-container {
        height: 140px;
    }

    .product-title {
        font-size: 0.8rem;
    }

    .pdp-title {
        font-size: 1.2rem;
    }

    .price-new {
        font-size: 1.6rem;
    }

    .hero-section h1 {
        font-size: 1.6rem !important;
    }
}