/* =========================================================
   PLUMBING MATERIAL E-COMMERCE
   Responsive site + admin styling
   ========================================================= */

:root {
    --ink: #10202a;
    --ink-soft: #4b5c65;
    --muted: #78878e;
    --paper: #f7f8f6;
    --white: #ffffff;
    --line: #dfe5e7;
    --accent: #0b7285;
    --accent-dark: #075766;
    --accent-soft: #e5f4f6;
    --green: #227a52;
    --red: #a83d3d;
    --shadow: 0 18px 50px rgba(16, 32, 42, 0.08);
    --radius: 18px;
    --max: 1180px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body,
button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    outline: none;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* =========================================================
   SHARED
   ========================================================= */

.page-section {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
}

.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.88rem;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-small {
    min-height: 40px;
    padding-inline: 15px;
    font-size: 0.82rem;
    background: var(--accent);
    color: white;
}

.btn-small:hover {
    background: var(--accent-dark);
}

.btn-submit {
    width: 100%;
    border: 0;
    min-height: 52px;
    font-size: 0.95rem;
}

.back-link {
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 750;
}

.back-link:hover {
    color: var(--accent);
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(223, 229, 231, 0.85);
}

.nav-container {
    width: min(var(--max), calc(100% - 40px));
    min-height: 74px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand,
.admin-brand,
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--ink);
    color: white;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.brand-text,
.brand > span:last-child,
.admin-brand > span:last-child,
.auth-brand > span:last-child {
    display: flex;
    flex-direction: column;
}

.brand strong,
.admin-brand strong,
.auth-brand strong {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.brand small,
.admin-brand small,
.auth-brand small {
    color: var(--muted);
    font-size: 0.58rem;
    letter-spacing: 0.15em;
    font-weight: 800;
}

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

.main-nav a {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 750;
}

.main-nav a:hover {
    color: var(--accent);
}

.nav-whatsapp {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 78px 0 90px;
    background:
        radial-gradient(circle at 80% 20%, rgba(11, 114, 133, 0.10), transparent 30%),
        linear-gradient(135deg, #eef7f8 0%, #f7f8f6 58%, #edf2f2 100%);
    border-bottom: 1px solid var(--line);
}

.hero-inner {
    width: min(var(--max), calc(100% - 40px));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 70px;
    align-items: center;
}

.hero-content h1 {
    max-width: 700px;
    margin: 14px 0 18px;
    font-size: clamp(2.8rem, 5.7vw, 5.3rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-content h1 span {
    color: var(--accent);
}

.hero-content p {
    max-width: 620px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-panel {
    min-height: 430px;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--ink);
    color: white;
    box-shadow: var(--shadow);
}

.hero-panel-top,
.hero-panel-bottom {
    position: absolute;
    left: 26px;
    right: 26px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.hero-panel-top {
    top: 24px;
    color: #b9d8dc;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.hero-panel-bottom {
    bottom: 25px;
    align-items: flex-end;
}

.hero-panel-bottom strong {
    max-width: 230px;
    font-size: 1.2rem;
    line-height: 1.2;
}

.hero-panel-bottom span {
    color: #9db0b6;
    font-size: 0.78rem;
}

.hero-art {
    position: absolute;
    inset: 70px 30px 80px;
}

.art-pipe {
    position: absolute;
    border: 16px solid #a9c4c8;
    border-radius: 80px;
    opacity: 0.9;
}

.art-pipe-a {
    width: 270px;
    height: 150px;
    left: 5%;
    top: 22%;
    border-right-color: transparent;
}

.art-pipe-b {
    width: 210px;
    height: 245px;
    right: 5%;
    top: 5%;
    border-left-color: transparent;
}

.art-pipe-c {
    width: 260px;
    height: 105px;
    left: 18%;
    bottom: 5%;
    border-top-color: transparent;
}

.art-joint {
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 9px rgba(11, 114, 133, 0.20);
}

.art-joint-a {
    left: 30%;
    top: 24%;
}

.art-joint-b {
    right: 25%;
    bottom: 17%;
}


/* =========================================================
   CATEGORIES
   ========================================================= */

.categories-section {
    padding-top: 76px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.section-heading h2 {
    margin: 7px 0 0;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.category-strip {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 24px 2px 8px;
    scrollbar-width: thin;
}

.category-chip {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 750;
    transition: 0.2s ease;
}

.category-chip:hover,
.category-chip.active {
    background: var(--ink);
    color: white;
    border-color: var(--ink);
}


/* =========================================================
   PRODUCTS
   ========================================================= */

.products-section {
    padding-top: 68px;
    padding-bottom: 90px;
}

.products-heading {
    margin-bottom: 28px;
}

.search-box {
    width: min(330px, 100%);
    position: relative;
}

.search-box input,
.admin-search input {
    width: 100%;
    height: 46px;
    padding: 0 40px 0 40px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
    color: var(--ink);
}

.search-box input:focus,
.admin-search input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(11, 114, 133, 0.10);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 9px;
    color: var(--muted);
    font-size: 1.25rem;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
}

.search-box button:hover {
    background: var(--paper);
    color: var(--ink);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    transition: 0.22s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-image-wrap {
    height: 230px;
    position: relative;
    overflow: hidden;
    background: #e9eff0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 20px;
    text-align: center;
    background: linear-gradient(145deg, #dfecee, #f5f7f6);
    color: var(--accent);
}

.product-placeholder span {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    font-weight: 900;
}

.product-placeholder strong {
    max-width: 90%;
    font-size: 1.05rem;
    line-height: 1.15;
}

.category-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 0.65rem;
    font-weight: 800;
}

.product-content {
    padding: 18px;
}

.product-category {
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-content h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.25;
}

.product-content p {
    min-height: 50px;
    margin: 8px 0 18px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.55;
}

.product-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.price-block {
    display: flex;
    flex-direction: column;
}

.price-label {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 750;
    text-transform: uppercase;
}

.product-price {
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.unavailable-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 11px;
    border-radius: 9px;
    background: #eef0f1;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.quick-order {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.quick-order a {
    color: var(--accent);
    font-size: 0.73rem;
    font-weight: 800;
}

.quick-order a:hover {
    text-decoration: underline;
}

.empty-state {
    padding: 70px 20px;
    border: 1px dashed #cbd5d8;
    border-radius: var(--radius);
    background: white;
    text-align: center;
}

.empty-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.5rem;
}

.empty-state h3 {
    margin: 0;
    font-size: 1.25rem;
}

.empty-state p {
    max-width: 450px;
    margin: 7px auto 20px;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 30px;
}

.page-button {
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: var(--ink-soft);
    font-weight: 800;
}

.page-button:hover:not(:disabled),
.page-button.active {
    background: var(--ink);
    color: white;
    border-color: var(--ink);
}

.page-button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}


/* =========================================================
   TRUST + FOOTER
   ========================================================= */

.trust-section {
    padding: 0 20px 80px;
}

.trust-grid {
    width: min(var(--max), 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.trust-card {
    padding: 27px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.trust-number {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.trust-card h3 {
    margin: 14px 0 7px;
}

.trust-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.83rem;
}

.site-footer {
    padding: 65px 20px 30px;
    background: var(--ink);
    color: white;
}

.footer-inner {
    width: min(var(--max), 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr auto;
    gap: 40px;
    align-items: end;
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.footer-subtitle {
    margin-top: 2px;
    color: #8da8ae;
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    font-weight: 800;
}

.footer-brand-block p {
    max-width: 440px;
    margin: 15px 0 0;
    color: #a9b7bb;
    font-size: 0.78rem;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-contact .eyebrow {
    color: #8da8ae;
    margin-bottom: 4px;
}

.footer-contact a {
    color: #d9e4e6;
    font-size: 0.8rem;
}

.footer-contact a:hover {
    color: white;
}

.footer-copy {
    color: #71858b;
    font-size: 0.7rem;
}


/* =========================================================
   ORDER PAGES
   ========================================================= */

.page-main {
    min-height: calc(100vh - 74px);
}

.order-section {
    padding: 65px 20px 90px;
}

.order-layout {
    width: min(1120px, 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 35px;
    align-items: start;
}

.order-product h1 {
    margin: 10px 0 25px;
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.selected-product {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.selected-product-image {
    height: 280px;
}

.selected-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-product-info {
    padding: 23px;
}

.selected-product-info h2 {
    margin: 3px 0 8px;
    font-size: 1.35rem;
}

.selected-product-info p {
    margin: 0 0 17px;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.selected-price {
    font-size: 1.35rem;
}

.order-note-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.order-note-box strong {
    color: var(--ink);
}

.order-note-box a {
    width: fit-content;
    margin-top: 7px;
    color: var(--accent);
    font-weight: 850;
}

.order-form-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
}

.order-form-card h2 {
    margin: 5px 0 25px;
    font-size: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.form-full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
}

.form-group label span {
    color: var(--muted);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfc;
    color: var(--ink);
    padding: 12px 13px;
    transition: 0.2s ease;
}

.form-group textarea {
    resize: vertical;
}

.quantity-control {
    display: grid;
    grid-template-columns: 43px 1fr 43px;
    height: 46px;
}

.quantity-control button {
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-size: 1.15rem;
}

.quantity-control button:first-child {
    border-radius: 10px 0 0 10px;
}

.quantity-control button:last-child {
    border-radius: 0 10px 10px 0;
}

.quantity-control input {
    border-radius: 0;
    text-align: center;
    padding: 0;
}

.order-summary {
    margin-top: 22px;
    padding: 17px;
    border-radius: 12px;
    background: var(--paper);
}

.order-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 7px 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.order-summary strong {
    color: var(--ink);
}

.order-summary .summary-total {
    margin-top: 7px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-weight: 800;
}

.order-summary .summary-total strong {
    font-size: 1.1rem;
}

.order-summary small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.67rem;
}

.form-disclaimer {
    margin: 12px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 0.68rem;
}

.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.alert-danger {
    background: #faeaea;
    color: var(--red);
}

.alert-success {
    background: #e7f5ed;
    color: var(--green);
}


/* =========================================================
   SUCCESS
   ========================================================= */

.success-section {
    min-height: calc(100vh - 74px);
    display: grid;
    place-items: center;
    padding: 55px 20px 80px;
}

.success-card {
    width: min(680px, 100%);
    padding: 50px;
    border: 1px solid var(--line);
    border-radius: 25px;
    background: white;
    box-shadow: var(--shadow);
    text-align: center;
}

.success-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e7f5ed;
    color: var(--green);
    font-size: 1.8rem;
    font-weight: 900;
}

.success-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.success-lead {
    max-width: 560px;
    margin: 0 auto;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.order-reference {
    margin: 28px 0 15px;
    padding: 14px;
    border-radius: 11px;
    background: var(--paper);
}

.order-reference span,
.success-details span {
    display: block;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.order-reference strong {
    font-size: 1.05rem;
}

.success-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    overflow: hidden;
    margin-top: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--line);
}

.success-details > div {
    padding: 14px;
    background: white;
    text-align: left;
}

.success-details strong {
    display: block;
    margin-top: 2px;
    font-size: 0.82rem;
}

.success-details .success-total {
    grid-column: 1 / -1;
    background: var(--accent-soft);
}

.success-details .success-total strong {
    font-size: 1.05rem;
}

.success-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}


/* =========================================================
   ADMIN
   ========================================================= */

.admin-shell {
    min-height: 100vh;
    background: var(--paper);
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid var(--line);
}

.admin-header-inner {
    width: min(1260px, calc(100% - 40px));
    min-height: 70px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.admin-nav a.logout-link {
    color: var(--red);
}

.admin-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
}

.admin-main {
    width: min(1260px, calc(100% - 40px));
    margin-inline: auto;
    padding: 55px 0 80px;
}

.narrow-admin {
    max-width: 900px;
}

.admin-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 28px;
}

.admin-page-heading h1 {
    margin: 5px 0 4px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.admin-page-heading p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.flash-stack {
    margin-bottom: 20px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: white;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card strong {
    display: block;
    margin-top: 5px;
    font-size: 2rem;
    line-height: 1;
}

.admin-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.admin-toolbar h2 {
    margin: 4px 0 0;
    font-size: 1.35rem;
}

.admin-search {
    width: 280px;
}

.admin-product-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.admin-table th {
    padding: 14px 17px;
    border-bottom: 1px solid var(--line);
    background: #f8faf9;
    color: var(--muted);
    text-align: left;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.admin-table td {
    padding: 14px 17px;
    border-bottom: 1px solid #edf0f1;
    font-size: 0.8rem;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-product {
    display: flex;
    align-items: center;
    gap: 11px;
}

.table-product img,
.table-placeholder {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 9px;
    object-fit: cover;
}

.table-placeholder {
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 900;
}

.table-product strong {
    display: block;
    max-width: 240px;
}

.table-product small {
    display: block;
    color: var(--muted);
    font-size: 0.65rem;
}

.table-category {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.65rem;
    font-weight: 800;
}

.status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 850;
}

.status-available {
    background: #e7f5ed;
    color: var(--green);
}

.status-unavailable {
    background: #f0f1f2;
    color: var(--muted);
}

.table-actions {
    display: flex;
    gap: 7px;
}

.table-actions form {
    margin: 0;
}

.action-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 800;
}

.action-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.action-button.danger {
    color: var(--red);
}

.action-button.danger:hover {
    border-color: var(--red);
    background: #faeaea;
}

.admin-form-card {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow);
}

.form-section-title {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 7px 0 22px;
    margin-top: 8px;
}

.form-section-title + .form-grid,
.form-section-title + .upload-area,
.form-section-title + .current-image-card,
.form-section-title + .switch-row {
    margin-bottom: 32px;
}

.form-section-title > span {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 900;
}

.form-section-title h2 {
    margin: 0;
    font-size: 1.05rem;
}

.form-section-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.75rem;
}

.field-help {
    color: var(--muted);
    font-size: 0.65rem;
    text-align: right;
}

.upload-area {
    overflow: hidden;
    border: 1px dashed #bccacc;
    border-radius: 14px;
    background: #fbfcfc;
}

.upload-label {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 25px;
    color: var(--ink-soft);
    text-align: center;
    cursor: pointer;
}

.upload-label:hover {
    background: var(--accent-soft);
}

.upload-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 5px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 900;
}

.upload-label strong {
    color: var(--ink);
    font-size: 0.88rem;
}

.upload-label span:last-child {
    color: var(--muted);
    font-size: 0.7rem;
}

.upload-preview {
    padding: 12px;
    border-top: 1px solid var(--line);
}

.upload-preview img {
    width: 100%;
    max-height: 270px;
    object-fit: contain;
    border-radius: 9px;
    background: #edf1f1;
}

.upload-preview button {
    width: 100%;
    margin-top: 8px;
    min-height: 36px;
    border: 1px solid #e1c5c5;
    border-radius: 8px;
    background: #faeaea;
    color: var(--red);
    font-size: 0.72rem;
    font-weight: 800;
}

.current-image-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
}

.current-image {
    width: 105px;
    height: 105px;
    overflow: hidden;
    flex: 0 0 105px;
    border-radius: 9px;
}

.current-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.current-image-card strong {
    font-size: 0.85rem;
}

.current-image-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.switch-row {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.switch-row > span:first-child {
    display: flex;
    flex-direction: column;
}

.switch-row strong {
    font-size: 0.8rem;
}

.switch-row small {
    color: var(--muted);
    font-size: 0.68rem;
}

.switch-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-ui {
    width: 47px;
    height: 26px;
    position: relative;
    flex: 0 0 47px;
    border-radius: 99px;
    background: #cbd4d6;
    transition: 0.2s ease;
}

.switch-ui::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    transition: 0.2s ease;
}

.switch-row input:checked + .switch-ui {
    background: var(--accent);
}

.switch-row input:checked + .switch-ui::after {
    transform: translateX(21px);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}


/* =========================================================
   ADMIN ORDERS
   ========================================================= */

.orders-list {
    display: grid;
    gap: 17px;
}

.order-admin-card {
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
}

.order-admin-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.order-id {
    display: block;
    font-size: 1rem;
    font-weight: 900;
}

.order-date {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.68rem;
}

.order-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 22px 0;
}

.order-admin-section {
    min-width: 0;
}

.order-section-label {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.order-admin-section h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.order-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.72rem;
}

.order-product-meta strong {
    color: var(--ink);
}

.contact-line {
    display: block;
    margin-top: 5px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 750;
}

.contact-line span {
    display: inline !important;
    color: var(--accent) !important;
    margin-right: 5px;
}

.order-address {
    margin: 0;
    color: var(--ink-soft);
    white-space: pre-line;
    font-size: 0.78rem;
}

.order-admin-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}


/* =========================================================
   ADMIN AUTH
   ========================================================= */

.admin-auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px 20px;
    background:
        radial-gradient(circle at 20% 20%, rgba(11, 114, 133, 0.12), transparent 28%),
        var(--paper);
}

.admin-auth-card {
    width: min(430px, 100%);
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
}

.auth-brand {
    margin-bottom: 40px;
}

.admin-auth-card h1 {
    margin: 7px 0 8px;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.admin-auth-card > p {
    margin: 0 0 25px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.admin-login-form {
    display: grid;
    gap: 17px;
}

.auth-back {
    display: block;
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 750;
}

.auth-back:hover {
    color: var(--accent);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-inner {
        gap: 40px;
    }

    .hero-panel {
        min-height: 390px;
    }
}

@media (max-width: 850px) {
    .hero {
        padding: 60px 0 65px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: 330px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-copy {
        grid-column: 1 / -1;
    }

    .order-layout {
        grid-template-columns: 1fr;
    }

    .order-product {
        max-width: 700px;
    }

    .admin-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .page-section,
    .nav-container,
    .admin-header-inner,
    .admin-main {
        width: min(100% - 28px, var(--max));
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 14px;
        right: 14px;
        top: calc(100% + 8px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: white;
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 11px;
    }

    .hero-content h1 {
        font-size: clamp(2.55rem, 13vw, 4.2rem);
    }

    .hero-content p {
        font-size: 0.92rem;
    }

    .hero-actions .btn {
        flex: 1;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .products-section {
        padding-top: 55px;
        padding-bottom: 65px;
    }

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

    .product-image-wrap {
        height: 175px;
    }

    .product-content {
        padding: 13px;
    }

    .product-content h3 {
        font-size: 0.88rem;
    }

    .product-content p {
        min-height: 0;
        margin-bottom: 13px;
        font-size: 0.72rem;
    }

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

    .btn-small {
        min-height: 36px;
        padding-inline: 11px;
        font-size: 0.7rem;
    }

    .quick-order a {
        font-size: 0.65rem;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-copy {
        grid-column: auto;
    }

    .order-section {
        padding: 45px 14px 60px;
    }

    .order-form-card {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-full {
        grid-column: auto;
    }

    .success-card {
        padding: 30px 18px;
    }

    .success-details {
        grid-template-columns: 1fr;
    }

    .success-details .success-total {
        grid-column: auto;
    }

    .admin-header-inner {
        min-height: 64px;
    }

    .admin-menu-toggle {
        display: block;
    }

    .admin-nav {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: white;
        box-shadow: var(--shadow);
    }

    .admin-nav.open {
        display: flex;
    }

    .admin-nav a {
        padding: 11px;
    }

    .admin-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-page-heading .btn {
        width: 100%;
    }

    .admin-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-search {
        width: 100%;
    }

    .admin-form-card {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .order-admin-grid {
        grid-template-columns: 1fr;
    }

    .order-admin-actions {
        flex-direction: column;
    }

    .order-admin-actions .btn {
        width: 100%;
    }

    .current-image-card {
        align-items: flex-start;
    }
}

@media (max-width: 430px) {
    .brand strong,
    .admin-brand strong {
        font-size: 0.82rem;
    }

    .product-grid {
        gap: 8px;
    }

    .product-image-wrap {
        height: 150px;
    }

    .category-badge {
        max-width: calc(100% - 18px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .product-content {
        padding: 11px;
    }

    .product-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .product-bottom .btn,
    .product-bottom .unavailable-button {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }

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

    .hero-panel {
        min-height: 290px;
    }

    .art-pipe {
        border-width: 11px;
    }

    .admin-auth-card {
        padding: 27px 20px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}


/* =========================================================
   BRAND / LOGO
   ========================================================= */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}

.brand-logo {
    width: auto;
    height: 58px;
    max-width: 190px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
}

.brand-text small {
    font-size: 0.68rem;
    margin-top: 3px;
    opacity: 0.7;
    white-space: nowrap;
}



@media (max-width: 768px) {

    .brand {
        gap: 7px;
    }

    .brand-logo {
        height: 46px;
        max-width: 145px;
    }

    .brand-text strong {
        font-size: 0.95rem;
    }

    .brand-text small {
        font-size: 0.6rem;
    }
}

/* =========================================================
   PWA INSTALL BANNER
========================================================= */

.pwa-install-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;

    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 14px;

    max-width: 620px;
    margin: 0 auto;

    padding: 14px 16px;

    background: #ffffff;

    border: 1px solid rgba(0, 0, 0, 0.08);

    border-radius: 14px;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.16);
}


.pwa-install-banner[hidden] {
    display: none;
}


.pwa-install-icon {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 12px;
}


.pwa-install-icon img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


.pwa-install-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.pwa-install-content strong {
    font-size: 0.95rem;
}


.pwa-install-content span {
    font-size: 0.78rem;

    line-height: 1.4;

    color: #666;
}


.pwa-install-button {
    border: none;

    padding: 10px 16px;

    border-radius: 8px;

    background: #0b5ed7;

    color: #ffffff;

    font-weight: 700;

    cursor: pointer;

    white-space: nowrap;
}


.pwa-install-button:hover {
    opacity: 0.9;
}


.pwa-install-close {
    width: 30px;
    height: 30px;

    padding: 0;

    border: none;

    background: transparent;

    color: #777;

    font-size: 1.4rem;

    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .pwa-install-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;

        gap: 10px;

        padding: 12px;
    }


    .pwa-install-icon {
        width: 44px;
        height: 44px;
    }


    .pwa-install-content strong {
        font-size: 0.85rem;
    }


    .pwa-install-content span {
        font-size: 0.7rem;
    }


    .pwa-install-button {
        padding: 9px 12px;

        font-size: 0.75rem;
    }

}