/* ── Putra Utama Motor — Custom CSS ── */

[x-cloak] { display: none !important; }

/* Kotak catur — preview gambar PNG transparan di admin */
.checkerboard-bg {
    background-color: #f3f4f6;
    background-image:
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

/* Line clamp utilities */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Prose styling for article content */
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #111827;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: .5em;
}
.prose h2 { font-size: 1.375rem; }
.prose h3 { font-size: 1.125rem; }
.prose p  { margin-bottom: 1em; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 1em; }
.prose ul li { list-style: disc; margin-bottom: .25em; }
.prose ol li { list-style: decimal; margin-bottom: .25em; }
.prose a  { color: #003087; text-decoration: underline; }
.prose img { max-width: 100%; border-radius: .75rem; margin: 1em auto; }
.prose blockquote {
    border-left: 4px solid #003087;
    padding-left: 1em;
    margin: 1em 0;
    color: #6b7280;
    font-style: italic;
}
.prose p.ql-align-center,
.prose .ql-align-center,
.prose p[style*="text-align: center"],
.prose p[style*="text-align:center"] { text-align: center; }
.prose p.ql-align-right,
.prose .ql-align-right,
.prose p[style*="text-align: right"],
.prose p[style*="text-align:right"] { text-align: right; }
.prose p.ql-align-justify,
.prose .ql-align-justify,
.prose p[style*="text-align: justify"],
.prose p[style*="text-align:justify"] {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}
.prose table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1em 0;
}
.prose table th,
.prose table td {
    border: 1px solid #e5e7eb;
    padding: 0.5em 0.75em;
    text-align: left;
    vertical-align: top;
}
.prose iframe,
.prose video,
.prose embed {
    max-width: 100%;
}
.prose pre {
    overflow-x: auto;
    max-width: 100%;
}

/* 360° canvas cursor */
#viewer-360 { user-select: none; }
#viewer-360.dragging { cursor: grabbing; }
#viewer-360:not(.dragging) { cursor: ew-resize; }

/* Custom scrollbar (optional) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #003087; }

/* Transition helpers */
.transition-default { transition: all 0.2s ease; }

/* Active state for nav */
.nav-active { background: rgba(255,255,255,.15); font-weight: 600; }

/* Print: hide WA button */
@media print {
    .fixed { display: none !important; }
    header { position: static !important; }
}

/* ── Category cards — tampilkan gambar utuh (desain sudah di file) ── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
}

@media (min-width: 640px) {
    .cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px;
    }
}

@media (min-width: 1024px) {
    .cat-grid {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 0;
    }

    .cat-grid .cat-card {
        flex: 1 1 0;
        min-width: 0;
        margin-left: -2.25rem;
    }

    .cat-grid .cat-card:first-child {
        margin-left: 0;
    }
}

@media (min-width: 1280px) {
    .cat-grid .cat-card {
        margin-left: -2.75rem;
    }

    .cat-grid .cat-card:first-child {
        margin-left: 0;
    }
}

.cat-card-slot {
    padding-left: 2px;
    padding-right: 2px;
}

.cat-card {
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.cat-card:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.14));
}

.cat-card-fallback {
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d1d5db 0%, #f3f4f6 100%);
    color: #6b7280;
    font-size: 1.125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0% 100%);
}

/* ── Product hero (model page) ── */
.product-hero-stage {
    background:
        radial-gradient(ellipse 85% 55% at 50% 42%, rgba(0, 48, 135, 0.09) 0%, transparent 68%),
        radial-gradient(ellipse 60% 30% at 50% 88%, rgba(0, 48, 135, 0.05) 0%, transparent 70%);
    border-radius: 1.5rem;
}
.product-hero-media-height {
    height: min(74vw, 280px);
}
@media (min-width: 640px) {
    .product-hero-media-height {
        height: min(52vw, 320px);
    }
}
@media (min-width: 1024px) {
    .product-hero-media-height {
        height: 340px;
    }
}
.product-hero-photo .product-hero-stage::after,
.product-hero-360 .product-hero-stage::after {
    content: '';
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    max-width: 28rem;
    height: 24px;
    background: radial-gradient(ellipse, rgba(15, 23, 42, 0.14) 0%, transparent 72%);
    pointer-events: none;
}
.product-360-canvas {
    display: block;
    filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15));
}

/* ── Maintenance overlay (mode update) ── */
@keyframes maintenanceFadeUp {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.maintenance-overlay .maintenance-card {
    animation: maintenanceFadeUp 0.45s ease-out both;
}
@keyframes maintenancePulseRing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 48, 135, 0.25); }
    50%      { box-shadow: 0 0 0 12px rgba(0, 48, 135, 0); }
}
.maintenance-overlay .maintenance-icon {
    animation: maintenancePulseRing 2.4s ease-in-out infinite;
}

/* ── Product spec panel ── */
.spec-panel .spec-row:hover {
    background-color: rgba(239, 246, 255, 0.5);
}

/* ── Product catalog cards (Yamaha-style) ── */
.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.product-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 14rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fb;
}

.product-card-img {
    width: 100%;
    height: auto;
    min-height: 11rem;
    max-height: 13rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

@media (min-width: 640px) {
    .product-card-media {
        min-height: 16rem;
        padding: 0.75rem 1rem;
    }

    .product-card-img {
        min-height: 13rem;
        max-height: 15rem;
    }
}

@media (min-width: 1280px) {
    .product-card-media {
        min-height: 17rem;
    }

    .product-card-img {
        min-height: 14rem;
        max-height: 16rem;
    }
}

.product-card:hover .product-card-img {
    transform: scale(1.04);
}

.product-card-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
}

.product-card-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.25;
}

.product-card-label {
    margin-top: 0.5rem;
    font-size: 0.6875rem;
    color: #9ca3af;
    line-height: 1.3;
}

.product-card-price {
    margin-top: 0.125rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.product-card-btn {
    flex-shrink: 0;
    background: #003087;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1.125rem;
    border-radius: 9999px;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.product-card:hover .product-card-btn {
    background: #002472;
}
