/* =======================================================
   THEME SHOP — Javanese Computer
   Laptop & Printer Repair / Store
   Biru tech (#0b2447) + aksen merah brand (#e31e24)
   Font: Plus Jakarta Sans
   ======================================================= */

/* Global Reset & Box Sizing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-soft: #f5f7fb;
    --surface: #ffffff;
    --ink-900: #0b1e3f;
    --ink-700: #1e293b;
    --ink-500: #475569;
    --ink-400: #64748b;
    --line: #e5ecf4;
    --brand-blue: #0b2447;      /* deep tech blue */
    --brand-blue-2: #19376d;
    --brand-cyan: #2563eb;
    --brand-red: #e31e24;       /* sesuai --red-brand */
    --brand-red-dark: #b8141a;
    --warn: #ef4444;
    --ok: #16a34a;
    --gold: #facc15;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 6px rgba(15, 35, 75, .06);
    --shadow-md: 0 10px 30px rgba(15, 35, 75, .08);
    --shadow-lg: 0 20px 45px rgba(15, 35, 75, .12);
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.shop-section {
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(800px 400px at 10% -10%, rgba(37,99,235,.08), transparent 60%),
        radial-gradient(700px 300px at 100% 0, rgba(227,30,36,.06), transparent 60%),
        var(--bg-soft);
    padding: 40px 0 80px;
    color: var(--ink-700);
}

.shop-section .container { 
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 0 18px; 
}

/* ---------- Page header ---------- */
.page-header {
    display: flex; 
    align-items: flex-end; 
    justify-content: space-between;
    gap: 16px; 
    flex-wrap: wrap; 
    margin-bottom: 28px;
}

.eyebrow {
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    font-size: .78rem; 
    font-weight: 700; 
    letter-spacing: .12em; 
    text-transform: uppercase;
    color: var(--brand-cyan); 
    background: #eaf1ff; 
    padding: 6px 12px; 
    border-radius: 999px;
}

.page-title {
    font-size: clamp(1.7rem, 2.4vw, 2.3rem); 
    color: var(--ink-900);
    margin: .4rem 0 .3rem; 
    font-weight: 800; 
    letter-spacing: -.01em;
}

.page-sub { 
    color: var(--ink-500); 
    margin: 0; 
}

/* ---------- Category hero ---------- */
.category-hero {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 18px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
    color: #fff; 
    padding: 28px; 
    border-radius: var(--radius-lg);
    position: relative; 
    overflow: hidden; 
    box-shadow: var(--shadow-md);
    margin-bottom: 22px;
}

.category-hero::before {
    content: ""; 
    position: absolute; 
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0/40px 40px,
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0/40px 40px;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
    opacity: .6; 
    pointer-events: none;
}

.category-hero::after {
    content: ""; 
    position: absolute; 
    right: -60px; 
    bottom: -60px;
    width: 260px; 
    height: 260px;
    background: radial-gradient(closest-side, rgba(227,30,36,.35), transparent 70%);
}

.category-hero .hero-text { 
    position: relative; 
    z-index: 1; 
}

.category-hero .eyebrow { 
    background: rgba(255,255,255,.12); 
    color: #bcd2ff; 
}

.category-hero h1 {
    margin: .3rem 0 .2rem;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    font-weight: 800;
}

.category-hero p { 
    margin: 0; 
    color: #c6d5ec; 
}

.cart-badge {
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    padding: 12px 18px; 
    border-radius: 999px;
    background: #fff; 
    color: var(--ink-900); 
    text-decoration: none; 
    font-weight: 700;
    box-shadow: var(--shadow-sm); 
    transition: .2s;
    position: relative; 
    z-index: 1;
}

.cart-badge:hover { transform: translateY(-2px); }

.cart-badge em {
    background: var(--brand-red); 
    color: #fff; 
    padding: 2px 10px; 
    border-radius: 999px;
    font-style: normal; 
    font-size: .85rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    padding: 12px 22px; 
    font-weight: 700; 
    border-radius: 12px; 
    border: none;
    cursor: pointer; 
    text-decoration: none;
    transition: .2s transform, .2s box-shadow, .2s background;
    font-family: inherit; 
    font-size: .95rem;
}

.btn-lg     { padding: 15px 28px; font-size: 1.05rem; border-radius: 999px; }
.btn-block  { width: 100%; }

.btn-primary {
    background: var(--brand-red); 
    color: #fff;
    box-shadow: 0 10px 22px rgba(227,30,36,.22);
}

.btn-primary:hover { 
    background: var(--brand-red-dark); 
    transform: translateY(-2px); 
}

.btn-ghost {
    background: #fff; 
    color: var(--brand-blue); 
    border: 1px solid var(--line);
}

.btn-ghost:hover { 
    background: var(--brand-blue); 
    color: #fff; 
}

.btn-disabled { 
    background: #cbd5e1; 
    color: #fff; 
    cursor: not-allowed; 
}

/* ---------- Search ---------- */
.search-box {
    display: flex; 
    align-items: center; 
    gap: 8px; 
    background: #fff;
    border: 1px solid var(--line); 
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    box-shadow: var(--shadow-sm); 
    max-width: 620px; 
    margin: 6px 0 22px;
}

.search-box i { color: var(--ink-400); }

.search-box input {
    border: none; 
    outline: none; 
    flex: 1; 
    padding: 12px 8px;
    font: inherit; 
    background: transparent;
}

.search-box button {
    background: var(--brand-blue); 
    color: #fff; 
    border: none;
    padding: 10px 22px; 
    border-radius: 999px;
    font-weight: 700; 
    cursor: pointer; 
    transition: .2s;
}

.search-box button:hover { background: var(--brand-red); }

.search-info { 
    color: var(--ink-500); 
    margin-bottom: 18px; 
}

.search-info a {
    color: var(--brand-red); 
    font-weight: 600; 
    text-decoration: none; 
    margin-left: 6px;
}

/* ---------- Product grid ---------- */
.product-grid {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
}

@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .product-grid { grid-template-columns: 1fr; } }

.product-card {
    background: #fff; 
    border-radius: var(--radius); 
    border: 1px solid var(--line);
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover {
    transform: translateY(-4px); 
    box-shadow: var(--shadow-md); 
    border-color: #dbe4f0;
}

.product-card.out-of-stock { opacity: .75; }
.product-card.out-of-stock .product-img { filter: grayscale(.85); }

.badge-habis {
    position: absolute; top: 12px; left: 12px;
    background: var(--brand-red); color: #fff;
    padding: 5px 12px; border-radius: 8px;
    font-weight: 800; font-size: .72rem; letter-spacing: .1em; z-index: 2;
}

.badge-limited {
    position: absolute; top: 12px; left: 12px;
    background: #fff1e6; color: #c2410c;
    padding: 5px 12px; border-radius: 8px;
    font-weight: 700; font-size: .72rem; z-index: 2;
    border: 1px solid #fed7aa;
}

.product-img-wrapper {
    display: flex; 
    align-items: center; 
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    height: 190px; 
    padding: 14px; 
    text-decoration: none;
}

.product-img {
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain;
    display: block;
    transition: transform .4s;
}

.product-card:hover .product-img { transform: scale(1.04); }

.product-info {
    padding: 16px; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    flex: 1;
}

.product-name {
    font-size: 1rem; 
    font-weight: 700; 
    margin: 0;
    line-height: 1.35; 
    min-height: 2.7em;
}

.product-name a { color: var(--ink-900); text-decoration: none; }
.product-name a:hover { color: var(--brand-red); }

.meta {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: .82rem; 
    color: var(--ink-400);
}

.meta .stock { display: inline-flex; align-items: center; gap: 5px; }

.link-detail { color: var(--brand-cyan); text-decoration: none; font-weight: 600; }
.link-detail:hover { color: var(--brand-red); }

.price {
    color: var(--brand-red); 
    font-size: 1.2rem; 
    font-weight: 800;
    margin: 4px 0 8px; 
    letter-spacing: -.01em;
}

/* Qty control */
.qty-control {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 10px;
    border: 1px solid var(--line); 
    border-radius: 12px;
    padding: 4px; 
    background: #f8fafc;
}

.btn-qty {
    width: 38px; 
    height: 38px; 
    border-radius: 10px; 
    border: 1px solid var(--line);
    background: #fff; 
    cursor: pointer; 
    font-size: .9rem; 
    color: var(--ink-700);
    transition: .2s; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
}

.btn-qty:hover:not(:disabled) {
    background: var(--brand-blue); 
    color: #fff; 
    border-color: var(--brand-blue);
}

.btn-qty.primary {
    background: var(--brand-red); 
    color: #fff; 
    border-color: var(--brand-red);
}

.btn-qty.primary:hover:not(:disabled) { background: var(--brand-red-dark); }
.btn-qty:disabled { opacity: .5; cursor: not-allowed; }

.qty-num {
    font-weight: 800; 
    min-width: 24px; 
    text-align: center; 
    color: var(--ink-900);
}

/* Empty grid (search 0 hasil) */
.empty-grid {
    grid-column: 1 / -1; 
    text-align: center; 
    padding: 60px 20px;
    background: #fff; 
    border: 1px dashed var(--line); 
    border-radius: var(--radius);
}

.empty-grid i { font-size: 2.4rem; color: var(--brand-cyan); margin-bottom: 10px; }
.empty-grid h3 { margin: 6px 0; color: var(--ink-900); }
.empty-grid p  { color: var(--ink-500); margin-bottom: 18px; }

/* ---------- Empty cart ---------- */
.empty-state {
    padding: 100px 20px; 
    background: var(--bg-soft); 
    font-family: var(--font);
}

.empty-card {
    max-width: 520px; 
    margin: 0 auto; 
    background: #fff;
    border-radius: var(--radius-lg); 
    padding: 50px 30px;
    text-align: center; 
    box-shadow: var(--shadow-md); 
    border: 1px solid var(--line);
}

.empty-icon {
    width: 80px; 
    height: 80px; 
    margin: 0 auto 18px; 
    border-radius: 50%;
    background: linear-gradient(135deg, #eef2ff, #fee2e2);
    display: grid; 
    place-items: center;
    color: var(--brand-red); 
    font-size: 2rem;
}

.empty-card h2 { color: var(--ink-900); margin: 0 0 8px; }
.empty-card p  { color: var(--ink-500); margin: 0 0 22px; }

/* ---------- Cart layout ---------- */
.cart-layout {
    display: grid; 
    grid-template-columns: 1.6fr 1fr; 
    gap: 22px;
    align-items: flex-start;
}

@media (max-width: 960px) { .cart-layout { grid-template-columns: 1fr; } }

/* Desktop cart table */
.cart-table {
    background: #fff; 
    border-radius: var(--radius); 
    overflow: hidden;
    border: 1px solid var(--line); 
    box-shadow: var(--shadow-sm);
}

.cart-table-head, .cart-row {
    display: grid;
    grid-template-columns: 2.4fr 1fr 0.8fr 1.1fr 0.6fr;
    align-items: center; 
    gap: 10px; 
    padding: 14px 18px;
}

.cart-table-head {
    background: #f8fafc; 
    color: var(--ink-500);
    font-size: .8rem; 
    letter-spacing: .08em; 
    text-transform: uppercase; 
    font-weight: 700;
}

.cart-row {
    border-top: 1px solid var(--line);
    transition: background .2s;
}

.cart-row:hover  { background: #fcfdff; }
.cart-row.row-warning { background: #fff7f7; }

.cell-product { display: flex; align-items: center; gap: 14px; }

.thumb {
    width: 70px; 
    height: 70px; 
    border-radius: 10px;
    overflow: hidden; 
    border: 1px solid var(--line);
    background: #f8fafc; 
    flex-shrink: 0;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-title {
    color: var(--ink-900); 
    font-weight: 700; 
    font-size: 1rem; 
    display: block;
}

.muted {
    color: var(--ink-400); 
    font-size: .82rem;
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    margin-top: 3px;
}

.warn {
    color: var(--warn); 
    font-size: .82rem;
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    margin-top: 3px;
    font-weight: 600;
}

.warn.center { justify-content: center; text-align: center; margin-top: 10px; }

.cell.price    { color: var(--ink-700); font-weight: 700; }
.cell.subtotal { color: var(--brand-red); font-weight: 800; }

.qty-pill {
    display: inline-block; 
    background: #eef2ff; 
    color: var(--brand-blue);
    padding: 6px 14px; 
    border-radius: 999px; 
    font-weight: 700;
}

.btn-delete {
    background: #fee2e2; 
    color: var(--brand-red); 
    border: none;
    padding: 10px 12px; 
    border-radius: 10px;
    cursor: pointer; 
    font-weight: 700; 
    transition: .2s;
}

.btn-delete:hover { background: var(--brand-red); color: #fff; }

/* Mobile cards */
.mobile-view { display: none; }

.cart-item-card {
    background: #fff; 
    border-radius: var(--radius);
    padding: 14px; 
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm); 
    border: 1px solid var(--line);
    display: flex; 
    gap: 12px; 
    align-items: center;
}

.cart-item-card.row-warning { background: #fff7f7; border-color: #fecaca; }

.thumb-mobile {
    width: 72px; 
    height: 72px; 
    object-fit: cover;
    border-radius: 10px; 
    flex-shrink: 0;
}

.item-info { flex: 1; }
.item-info h4 {
    margin: 0 0 4px; 
    color: var(--ink-900); 
    font-size: .98rem;
}

.subtotal-m {
    margin: 4px 0 0; 
    font-weight: 800; 
    color: var(--brand-red);
}

/* ---------- Summary / Form ---------- */
.cart-summary {
    display: flex; 
    flex-direction: column; 
    gap: 16px;
    position: sticky; 
    top: 20px;
}

.summary-card {
    background: #fff; 
    border-radius: var(--radius); 
    padding: 22px;
    box-shadow: var(--shadow-sm); 
    border: 1px solid var(--line);
}

.summary-card h3 {
    margin: 0 0 16px; 
    color: var(--ink-900); 
    font-size: 1.05rem;
    display: flex; 
    align-items: center; 
    gap: 10px;
    padding-bottom: 12px; 
    border-bottom: 1px solid var(--line);
}

.summary-card h3 i { color: var(--brand-red); }

.summary-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 8px 0; 
    color: var(--ink-500);
}

.summary-row strong { color: var(--ink-900); }

.total-row {
    border-top: 1px dashed var(--line);
    padding-top: 14px; 
    margin-top: 6px; 
    font-size: 1.05rem;
}

.total-amount {
    color: var(--brand-red); 
    font-size: 1.4rem; 
    font-weight: 800; 
    letter-spacing: -.01em;
}

/* Form fields */
.form-group { margin-bottom: 14px; }

.form-group label {
    display: block; 
    margin-bottom: 6px;
    font-weight: 600; 
    color: var(--ink-700); 
    font-size: .88rem;
}

.input-wrap {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: #f8fafc;
    border: 1px solid var(--line); 
    border-radius: 10px;
    padding: 0 12px; 
    transition: .2s;
}

.input-wrap:focus-within {
    background: #fff; 
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}

.input-wrap i { color: var(--ink-400); }

.input-wrap input,
.input-wrap textarea {
    flex: 1; 
    border: none; 
    outline: none; 
    background: transparent;
    font: inherit; 
    padding: 12px 0; 
    color: var(--ink-900);
}

.input-wrap.textarea { align-items: flex-start; padding: 12px; }
.input-wrap.textarea i { margin-top: 4px; }
.input-wrap textarea { resize: vertical; padding: 0; }

.btn-checkout {
    width: 100%; 
    margin-top: 10px; 
    background: var(--brand-red); 
    color: #fff;
    border: none; 
    padding: 16px 20px; 
    font-weight: 800; 
    font-size: 1rem;
    border-radius: 999px; 
    cursor: pointer;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
    box-shadow: 0 14px 30px rgba(227,30,36,.25); 
    transition: .25s;
    font-family: inherit;
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(227,30,36,.35);
    background: var(--brand-red-dark);
}

.btn-checkout.disabled {
    background: #94a3b8; 
    box-shadow: none; 
    cursor: not-allowed;
}

.hint {
    text-align: center; 
    color: var(--ink-400);
    font-size: .82rem; 
    margin: 10px 0 0;
}

.hint i { color: var(--ok); margin-right: 4px; }

.trust-badges {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px;
    background: #fff; 
    border: 1px solid var(--line);
    border-radius: var(--radius); 
    padding: 14px;
}

.trust-badges > div {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 6px;
    text-align: center; 
    font-size: .78rem; 
    color: var(--ink-500); 
    font-weight: 600;
}

.trust-badges i { color: var(--brand-blue); font-size: 1.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .desktop-view  { display: none; }
    .mobile-view   { display: block; }
    .category-hero { padding: 22px; }
}