/* Mobile viewport & overflow — cegah layout desktop "melebar" di HP */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (max-width: 1024px) {
    html,
    body {
        overflow-x: clip;
        max-width: 100%;
    }
}

/* ===== Semantic colors — red only as brand accent ===== */
:root {
    --star: #fbbf24;
    --star-empty: #4b5563;
    --success: #22c55e;
    --success-subtle: rgba(34, 197, 94, 0.12);
    --info: #60a5fa;
    --info-subtle: rgba(96, 165, 250, 0.12);
    --link: #b8bcc4;
    --link-hover: var(--primary-light);
    --icon-muted: #9ca3af;
    --tag-bg: rgba(255, 255, 255, 0.05);
    --tag-text: #c8ccd2;
    --tag-border: rgba(255, 255, 255, 0.1);
    --price: #e8c878;
    --price-light: #f5dfa0;
}

/* Links — neutral default, red on interaction */
a { color: var(--link); }
a:hover { color: var(--link-hover); }

.navbar-brand,
.navbar-brand:hover,
.btn,
.btn:hover,
.nav-cta,
.nav-cta:hover {
    color: inherit;
}

.btn-whatsapp,
.btn-whatsapp:hover {
    color: #fff !important;
    background: #25d366 !important;
}

.btn-whatsapp:hover {
    background: #20bd5a !important;
}

/* Stars & ratings — gold, not red */
.product-rating i,
.rating-big .stars i,
.testimonial-stars i {
    color: var(--star) !important;
}

.product-rating i.empty {
    color: var(--star-empty) !important;
}

/* Harga — champagne gold */
.product-price,
.pricing-price,
.payment-amount,
.summary-row span:last-child {
    color: var(--price) !important;
}

.product-detail-price,
.total-amount,
.summary-total span:last-child {
    color: var(--price-light) !important;
}

.verified-badge,
.verified-badge i {
    color: #22c55e !important;
}

/* Feature tags — neutral */
.feature-tag {
    background: var(--tag-bg) !important;
    color: var(--tag-text) !important;
    border: 1px solid var(--tag-border) !important;
}

/* Trust / section icons — subtle bg, red icon only */
.trust-icon,
.auto-icon {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border) !important;
    color: var(--primary) !important;
}

.about-list li i,
.feature-list li i {
    color: var(--icon-muted) !important;
}

/* Profil Victory Miner — netral, tanpa gradasi merah */
.about-section .about-list li i {
    color: var(--success) !important;
}

.about-section .info-icon-komdigi,
.about-section .info-cert-thumb {
    background: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Status badges — semantic colors */
.badge-success,
.status-approved,
.status-processing,
.status-completed {
    background: var(--success-subtle) !important;
    color: var(--success) !important;
}

.status-shipped {
    background: var(--info-subtle) !important;
    color: var(--info) !important;
}

.status-pending {
    background: rgba(245, 158, 11, 0.12) !important;
    color: var(--warning) !important;
}

.status-paid {
    background: var(--info-subtle) !important;
    color: var(--info) !important;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    color: var(--warning) !important;
}

.stock-status.in-stock {
    background: var(--success-subtle) !important;
    color: var(--success) !important;
}

.warranty-icon.active {
    background: var(--success-subtle) !important;
    color: var(--success) !important;
}

.warranty-status-box.status-aktif {
    background: var(--success-subtle) !important;
    border-color: rgba(34, 197, 94, 0.25) !important;
}

/* Footer & misc icons — muted, not all red */
.footer-contact li i {
    color: var(--icon-muted) !important;
}

.footer-social a:hover {
    background: var(--primary) !important;
}

.marquee-content span i {
    color: var(--primary) !important;
}

.form-section h3 i {
    color: var(--icon-muted) !important;
}

/* Progress & bars */
.bar-fill,
.progress-fill {
    background: linear-gradient(90deg, var(--primary), var(--star)) !important;
}

/* Author avatar — keep brand red gradient (intentional accent) */
.author-avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

/* ===== Global responsive foundation ===== */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.container {
    padding-left: clamp(16px, 4vw, 24px);
    padding-right: clamp(16px, 4vw, 24px);
}

/* iOS safe area */
.navbar {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

body {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.whatsapp-float {
    bottom: calc(24px + env(safe-area-inset-bottom, 0));
    right: calc(24px + env(safe-area-inset-right, 0));
}

/* Prevent iOS input zoom */
input, select, textarea {
    font-size: 16px;
}

@media (min-width: 769px) {
    input, select, textarea {
        font-size: 0.9rem;
    }
}

/* ===== Hero — mobile sizing like original ===== */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: calc(var(--navbar-height) + 32px) 0 72px;
    }

    /* 3 stats — satu baris wrap, ukuran seperti semula */
    .hero-stats {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px 28px;
        margin-bottom: 0;
    }

    .hero-eyebrow {
        font-size: 0.75rem;
        padding: 7px 16px;
        max-width: 90%;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 7vw, 2.4rem);
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 3.5vw, 1.05rem);
        padding: 0 4px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 40px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .glass-stat {
        flex: 0 1 auto;
        min-width: auto;
        padding: 16px 20px;
    }

    .stat-item strong,
    .stat-item .stat-text {
        font-size: 1.65rem;
    }

    .stat-label {
        font-size: 0.78rem;
    }
}

@media (max-width: 380px) {
    .hero-stats {
        gap: 12px;
    }

    .glass-stat {
        padding: 12px 16px;
        min-width: calc(50% - 8px);
    }

    .brand-text small,
    .brand-tagline {
        font-size: 0.55rem;
        letter-spacing: 0.12em;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }
}

/* ===== Navbar mobile ===== */
@media (max-width: 1024px) {
    .navbar-inner {
        gap: 12px;
    }

    .navbar-actions {
        display: flex;
    }

    .nav-cta {
        padding: 9px 14px !important;
        font-size: 0.8rem !important;
    }

    .nav-cta-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    .nav-cta-text {
        display: none;
    }

    .nav-cta {
        padding: 10px 12px !important;
    }

    .profile-card-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .profile-badge-komdigi {
        margin-left: 0;
    }

    .komdigi-logo {
        height: 26px;
        max-width: 88px;
    }
}

/* ===== Sections & grids ===== */
@media (max-width: 768px) {
    .section {
        padding: 56px 0;
    }

    .section-header h2 {
        font-size: clamp(1.4rem, 5vw, 1.85rem);
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .about-metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .about-profile-media {
        margin-bottom: 24px;
    }

    .about-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .about-profile-photo {
        min-height: 100px;
        aspect-ratio: 16 / 10;
    }

    .testimonials-rating-summary {
        padding: 24px 16px;
        gap: 20px;
    }

    .page-hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .checkout-grid,
    .product-detail-grid {
        gap: 24px;
    }

    .product-detail-section {
        padding-top: 88px;
    }

    .product-detail-image {
        width: 100%;
        max-width: 100%;
    }

    .product-gallery {
        border-radius: var(--radius);
    }

    .product-gallery-viewport {
        aspect-ratio: 16 / 10;
        min-height: unset;
        max-height: none;
    }

    .product-gallery-slide {
        object-fit: cover;
        object-position: center;
        background: var(--dark-light);
    }

    .product-gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .product-gallery-prev { left: 8px; }
    .product-gallery-next { right: 8px; }

    .shipping-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tracking — pre order wait panel */
@media (max-width: 480px) {
    .preorder-wait-visual {
        gap: 4px;
    }

    .pwi-globe, .pwi-ship, .pwi-warehouse {
        width: 30px;
        height: 30px;
        font-size: 0.72rem;
    }

    .tracking-timeline {
        padding-left: 36px;
    }

    .timeline-dot {
        left: -36px;
        width: 26px;
        height: 26px;
    }
}

/* Touch targets */
@media (max-width: 1024px) {
    .navbar-menu a,
    .navbar-toggle,
    .nav-cta,
    .slider-btn,
    .btn {
        min-height: 44px;
    }
}

/* Tablet landscape & small laptops */
@media (min-width: 769px) and (max-width: 1100px) {
    .navbar-menu a {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
}
