/* =====================================================
   Jalandhar Pipe & Fitting Store
   Design tokens: industrial trade-supply identity
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
    --navy: #123150;
    --navy-light: #1d4b78;
    --navy-dark: #0b1f33;
    --steel: #54677a;
    --steel-light: #8295a6;
    --amber: #e08a1e;
    --amber-dark: #b96f13;
    --bg: #f5f6f8;
    --white: #ffffff;
    --line: #e2e6ea;
    --success: #2e8b57;
    --danger: #c0392b;
    --radius: 4px;
    --shadow: 0 2px 10px rgba(18, 49, 80, 0.08);
    --shadow-md: 0 6px 24px rgba(18, 49, 80, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--navy-dark);
    background: var(--bg);
    line-height: 1.55;
}

h1, h2, h3, h4 {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--navy-dark);
    margin: 0 0 0.5em;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { font-size: 28px; margin: 0; }
.section-head p { color: var(--steel); margin: 0; font-size: 14px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'IBM Plex Mono', monospace; font-size: 12px;
    letter-spacing: 1.5px; text-transform: uppercase; color: var(--amber-dark);
    margin-bottom: 10px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--amber); display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius); font-weight: 700; font-size: 14.5px;
    border: 2px solid transparent; cursor: pointer; transition: all .15s ease; text-align: center;
    font-family: 'Inter', sans-serif;
}
.btn-amber { background: var(--amber); color: var(--navy-dark); }
.btn-amber:hover { background: var(--amber-dark); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-outline-navy { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */
.topbar {
    background: var(--navy-dark); color: #cdd9e4; font-size: 12.5px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #cdd9e4; }
.topbar .topbar-right { display: flex; gap: 18px; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 6px; background: var(--navy);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background-image: repeating-linear-gradient(45deg, var(--navy-light) 0 4px, var(--navy) 4px 9px);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text .name { font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 800; font-size: 18px; line-height: 1.1; }
.brand-text .tag { font-size: 11.5px; color: var(--steel); text-transform: uppercase; letter-spacing: .8px; }

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a { font-weight: 600; font-size: 14.5px; color: var(--navy-dark); position: relative; padding: 6px 0; }
.main-nav a.active, .main-nav a:hover { color: var(--amber-dark); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.icon-link { position: relative; display: inline-flex; padding: 6px; }
.icon-link svg { width: 22px; height: 22px; stroke: var(--navy-dark); }
.cart-badge {
    position: absolute; top: -2px; right: -2px; background: var(--amber); color: var(--navy-dark);
    font-size: 10.5px; font-weight: 800; border-radius: 50%; min-width: 17px; height: 17px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

@media (max-width: 880px) {
    .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column;
        align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--line); display: none; gap: 14px; }
    .main-nav.open { display: flex; }
    .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
    background: var(--navy); position: relative; overflow: hidden; color: var(--white);
    background-image:
        repeating-linear-gradient(115deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px),
        linear-gradient(125deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 64px 20px; }
.hero h1 { font-size: 42px; line-height: 1.12; color: var(--white); max-width: 520px; }
.hero p.lead { color: #cdd9e4; font-size: 16px; max-width: 460px; margin-bottom: 26px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { position: relative; height: 320px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.hero-badges { display: flex; gap: 22px; margin-top: 36px; flex-wrap: wrap; }
.hero-badges .badge { font-size: 13px; color: #cdd9e4; }
.hero-badges .badge b { display: block; color: var(--white); font-family: 'Barlow Semi Condensed'; font-size: 16px; }

@media (max-width: 880px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .hero-art { height: 200px; order: -1; }
}

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--white); border-bottom: 1px solid var(--line); }
.trust-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 22px 20px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item .ic { width: 36px; height: 36px; border-radius: 50%; background: rgba(224,138,30,.13); display: flex; align-items: center; justify-content: center; flex-shrink:0; }
.trust-item .ic svg { width: 18px; height: 18px; stroke: var(--amber-dark); }
.trust-item b { display: block; font-size: 14px; }
.trust-item span { font-size: 12.5px; color: var(--steel); }
@media (max-width: 880px) { .trust-strip .container { grid-template-columns: repeat(2,1fr); } }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 18px; text-align: center; transition: all .15s ease;
}
.cat-card:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card .cat-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.cat-card .cat-ic svg { width: 28px; height: 28px; stroke: var(--navy); }
.cat-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.cat-card span { font-size: 12.5px; color: var(--steel); }
@media (max-width: 880px) { .cat-grid { grid-template-columns: repeat(2,1fr); } }

/* ---------- Product grid / card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 720px) { .product-grid { grid-template-columns: repeat(2,1fr); } }

.product-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-thumb { position: relative; aspect-ratio: 1/1; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.discount-tag {
    position: absolute; top: 10px; left: 10px; background: var(--amber); color: var(--navy-dark);
    font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 3px;
    font-family: 'IBM Plex Mono', monospace;
}
.product-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--steel); }
.product-name { font-family: 'Inter'; font-weight: 700; font-size: 14.5px; color: var(--navy-dark); }
.product-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.product-price .now { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 16px; color: var(--navy); }
.product-price .was { text-decoration: line-through; color: var(--steel-light); font-size: 12.5px; }
.product-actions { padding: 0 16px 16px; }
.stock-pill { font-size: 11px; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.stock-in { background: rgba(46,139,87,.12); color: var(--success); }
.stock-out { background: rgba(192,57,43,.12); color: var(--danger); }

/* ---------- Shop layout ---------- */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
@media (max-width: 880px) { .shop-layout { grid-template-columns: 1fr; } }
.filter-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.filter-box h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.filter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.filter-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 3px; font-size: 14px; color: var(--navy-dark); }
.filter-list a.active, .filter-list a:hover { background: var(--bg); color: var(--amber-dark); }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.shop-toolbar select { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-family: 'Inter'; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 32px; max-width: 460px; margin: 0 auto; box-shadow: var(--shadow); }
.form-card.wide { max-width: 720px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius);
    font-family: 'Inter'; font-size: 14.5px; background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224,138,30,.18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 18px; }
.alert-error { background: rgba(192,57,43,.1); color: var(--danger); border: 1px solid rgba(192,57,43,.25); }
.alert-success { background: rgba(46,139,87,.1); color: var(--success); border: 1px solid rgba(46,139,87,.25); }

/* ---------- Cart / checkout table ---------- */
.cart-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cart-table th { text-align: left; background: var(--bg); padding: 12px 16px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--steel); }
.cart-table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.cart-prod { display: flex; gap: 12px; align-items: center; }
.cart-prod img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--bg); }
.qty-input { width: 60px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; text-align: center; }
.cart-summary { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; }
.cart-summary .row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 800; font-size: 17px; }

/* ---------- Page header banner (about / contact / shop) ---------- */
.page-banner { background: var(--navy-dark); color: var(--white); padding: 38px 0; }
.page-banner h1 { color: var(--white); margin-bottom: 6px; }
.page-banner p { color: #cdd9e4; margin: 0; font-size: 14px; }
.breadcrumb { font-size: 12.5px; color: var(--steel-light); margin-top: 6px; }
.breadcrumb a { color: #aebfcd; }

/* ---------- About page ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat-card .num { font-family: 'Barlow Semi Condensed'; font-weight: 800; font-size: 30px; color: var(--amber-dark); }
.stat-card .label { font-size: 13px; color: var(--steel); }
@media (max-width: 880px) { .stat-strip { grid-template-columns: repeat(2,1fr); } }

.quality-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.quality-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.quality-list li svg { width: 18px; height: 18px; stroke: var(--success); flex-shrink: 0; margin-top: 3px; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-card { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 24px; margin-bottom: 16px; }
.contact-info-card h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #aebfcd; padding-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 36px; }
.footer-grid h4 { color: var(--white); font-size: 14px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.footer-grid ul a:hover { color: var(--amber); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .name { color: var(--white); font-family: 'Barlow Semi Condensed'; font-weight: 800; font-size: 17px; }
.footer-grid p { font-size: 13.5px; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; text-align: center; font-size: 12.5px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--steel); }
.empty-state svg { width: 64px; height: 64px; stroke: var(--steel-light); margin-bottom: 16px; }
.badge-status { padding: 3px 10px; border-radius: 12px; font-size: 11.5px; font-weight: 700; text-transform: capitalize; }
.status-pending { background: rgba(224,138,30,.15); color: var(--amber-dark); }
.status-confirmed, .status-delivered { background: rgba(46,139,87,.15); color: var(--success); }
.status-shipped { background: rgba(29,75,120,.12); color: var(--navy-light); }
.status-cancelled { background: rgba(192,57,43,.12); color: var(--danger); }

.table-basic { width: 100%; border-collapse: collapse; background: var(--white); }
.table-basic th, .table-basic td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.table-basic th { background: var(--bg); font-size: 12px; text-transform: uppercase; color: var(--steel); }

/* ---------- Admin ---------- */
.admin-body { background: #eef1f4; }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--navy-dark); color: #cdd9e4; padding: 22px 0; }
.admin-sidebar .brand { padding: 0 20px 22px; color: var(--white); font-family: 'Barlow Semi Condensed'; font-weight: 800; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14px; font-weight: 600; color: #aebfcd; }
.admin-sidebar nav a.active, .admin-sidebar nav a:hover { background: rgba(255,255,255,.06); color: var(--white); border-left: 3px solid var(--amber); }
.admin-main { padding: 26px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 26px; }
.admin-card { background: var(--white); border-radius: 6px; padding: 18px; border: 1px solid var(--line); }
.admin-card .num { font-family: 'Barlow Semi Condensed'; font-size: 26px; font-weight: 800; color: var(--navy); }
.admin-card .label { font-size: 13px; color: var(--steel); }
.admin-panel { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }
@media (max-width: 980px) { .admin-shell { grid-template-columns: 1fr; } .admin-cards { grid-template-columns: repeat(2,1fr); } }
