@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --shn-green: #2f5e3b;
  --shn-green-dark: #1a341f;
  --shn-lime: #7adf3b;
  --shn-ink: #2f2b26;
  --shn-muted: #64748b;
  --shn-paper: #f8fafc;
  --shn-line: #dbe3dd;
}

.shop-page { background: var(--shn-paper); color: var(--shn-ink); }
.shop-page h1, .shop-page h2, .owner-page h1, .owner-page h2, .owner-page h3 { font-family: "Oswald", "Arial Narrow", sans-serif; }
.shop-main { width: min(1200px, 92vw); margin: 0 auto; padding: clamp(34px, 6vw, 72px) 0; min-height: 58vh; }
.shop-main--narrow { width: min(980px, 92vw); }
.shop-hero { text-align: center; margin: 0 auto 30px; max-width: 720px; }
.shop-hero h1 { color: #14532d; font-size: clamp(32px, 5vw, 54px); margin: 5px 0; text-transform: uppercase; }
.shop-hero p:last-child { color: var(--shn-muted); font-size: 17px; }
.shop-eyebrow, .catalog-card__category { margin: 0; color: var(--shn-green); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.category-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 30px; }
.category-pills a { border: 1px solid #cbd5e1; border-radius: 999px; padding: 8px 14px; color: #334155; text-decoration: none; background: white; font-weight: 700; }
.category-pills a:hover, .category-pills a.is-active { color: #0f2216; border-color: var(--shn-lime); background: var(--shn-lime); }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.catalog-card { background: white; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px; box-shadow: 0 8px 20px rgb(15 23 42 / 8%); display: flex; flex-direction: column; }
.catalog-card img { width: 100%; height: 210px; padding: 10px; object-fit: contain; border: 1px solid #e2e8f0; border-radius: 11px; }
.catalog-card__category { margin-top: 13px; }
.catalog-card h2 { font-size: 21px; margin: 5px 0; line-height: 1.2; }
.catalog-card h2 a, .cart-row h2 a, .product-shop-card h3 a { color: var(--shn-ink); text-decoration: none; }
.catalog-card__description { color: var(--shn-muted); line-height: 1.5; flex: 1; }
.catalog-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #edf1ee; padding-top: 12px; }
.catalog-card__footer strong, .shop-card__price { color: #14532d; font-size: 18px; font-weight: 800; }
.shop-button, button.product-shop-card__btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--shn-green); border-radius: 999px; background: var(--shn-green); color: white; padding: 10px 17px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.shop-button:hover, button.product-shop-card__btn:hover { background: var(--shn-green-dark); }
.shop-button:disabled, button.product-shop-card__btn:disabled { opacity: .45; cursor: not-allowed; }
.shop-button--secondary { color: var(--shn-green); background: white; }
.product-shop-card form, .product-shop-card form button { width: 100%; }
.shop-card__image-link { display: block; }
.product-shop-card h3 { margin: 0; font-size: 17px; }
.product-shop-card__service { margin-bottom: 0; }
.shop-card__price { margin: auto 0 0; }
.shop-empty, .success-card { width: 100%; padding: 50px 24px; text-align: center; background: white; border: 1px solid var(--shn-line); border-radius: 18px; }
.product-detail { display: grid; grid-template-columns: minmax(280px, 1fr) 1fr; gap: clamp(30px, 6vw, 72px); padding: 28px; background: white; border: 1px solid var(--shn-line); border-radius: 18px; }
.product-detail__image img { width: 100%; height: min(440px, 60vw); object-fit: contain; }
.product-detail h1 { color: #14532d; font-size: clamp(31px, 5vw, 48px); margin: 8px 0; }
.product-detail__description { color: var(--shn-muted); line-height: 1.7; }
.product-detail__price { color: #14532d; font-size: 27px; font-weight: 800; }
.stock-note { font-weight: 700; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--shn-green); font-weight: 800; text-decoration: none; }
.add-form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.add-form label { display: grid; gap: 5px; font-weight: 700; }
.add-form input, .cart-row input { width: 85px; padding: 10px; border: 1px solid #bdc9c0; border-radius: 8px; }
.cart-list { display: grid; gap: 13px; }
.cart-row { display: grid; grid-template-columns: 90px minmax(180px, 1fr) auto auto; align-items: center; gap: 18px; padding: 14px; background: white; border: 1px solid var(--shn-line); border-radius: 14px; }
.cart-row img { width: 90px; height: 80px; object-fit: contain; }
.cart-row h2 { font-size: 19px; margin: 0; }
.cart-row p { margin: 5px 0; color: var(--shn-muted); }
.cart-row form { display: flex; align-items: center; gap: 7px; }
.cart-summary { margin-top: 20px; margin-left: auto; width: min(420px, 100%); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding: 20px; background: #0f2216; color: white; border-radius: 14px; }
.cart-summary strong { font-size: 24px; }
.cart-summary .shop-button { grid-column: 1 / -1; background: var(--shn-lime); color: #0f2216; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 24px; align-items: start; }
.shop-form, .order-recap { display: grid; gap: 15px; padding: 24px; background: white; border: 1px solid var(--shn-line); border-radius: 16px; }
.shop-form label { display: grid; gap: 6px; font-weight: 700; }
.shop-form input, .shop-form textarea { width: 100%; padding: 11px 12px; border: 1px solid #bfcac1; border-radius: 8px; font: inherit; }
.shop-form input:focus, .shop-form textarea:focus { outline: 3px solid rgb(122 223 59 / 30%); border-color: var(--shn-green); }
.order-recap h2 { margin: 0; }
.order-recap p { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.order-recap__total { font-size: 20px; }
.form-error { padding: 12px 15px; margin-bottom: 16px; color: #8b1e1e !important; background: #fff1f1; border: 1px solid #efb8b8; border-radius: 9px; }
.success-card > span { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; color: #0f2216; background: var(--shn-lime); font-size: 34px; font-weight: 900; }
.shop-footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px max(4vw, 20px); background: #0f2216; color: white; }
.shop-footer div { display: grid; gap: 5px; }
.shop-footer a { color: var(--shn-lime); font-weight: 800; }

/* Private owner interface: same S.H.N visual language, isolated in the port 5001 app. */
.owner-page { margin: 0; min-height: 100vh; background: #f3f6f4; color: var(--shn-ink); font-family: "Source Sans 3", Arial, sans-serif; }
.owner-page *, .owner-page *::before, .owner-page *::after { box-sizing: border-box; }
.owner-shell { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: 100vh; }
.owner-sidebar { position: sticky; top: 0; height: 100vh; padding: 25px 18px; background: #0f2216; color: white; }
.owner-brand { display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-family: "Oswald", sans-serif; font-size: 22px; }
.owner-brand img { width: 52px; height: 52px; object-fit: contain; background: white; border-radius: 9px; }
.owner-badge { margin: 9px 0 26px 64px; color: var(--shn-lime); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.owner-nav { display: grid; gap: 5px; }
.owner-nav a { color: #dce8df; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.owner-nav a:hover, .owner-nav a.is-active { color: #0f2216; background: var(--shn-lime); }
.owner-logout { position: absolute; bottom: 22px; left: 18px; right: 18px; }
.owner-logout button { width: 100%; padding: 9px; color: white; border: 1px solid #54715c; border-radius: 8px; background: transparent; cursor: pointer; }
.owner-content { min-width: 0; padding: clamp(24px, 4vw, 52px); }
.owner-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 25px; }
.owner-header h1 { margin: 0; color: #173f25; font-size: clamp(30px, 4vw, 45px); }
.owner-header p { margin: 5px 0 0; color: var(--shn-muted); }
.owner-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.owner-card, .owner-panel { padding: 20px; background: white; border: 1px solid var(--shn-line); border-radius: 13px; box-shadow: 0 6px 16px rgb(20 60 30 / 6%); }
.owner-card span { color: var(--shn-muted); }
.owner-card strong { display: block; margin-top: 5px; color: #173f25; font: 700 31px "Oswald", sans-serif; }
.owner-dashboard-panel { margin-top: 20px; }
.owner-table-wrap { overflow-x: auto; background: white; border: 1px solid var(--shn-line); border-radius: 13px; }
.owner-table { width: 100%; border-collapse: collapse; }
.owner-table th, .owner-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
.owner-table th { color: #42604b; background: #f6f9f7; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.owner-table img { width: 55px; height: 48px; object-fit: contain; }
.owner-product-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.owner-actions form { display: inline; }
.owner-button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 13px; color: white; background: var(--shn-green); border: 1px solid var(--shn-green); border-radius: 8px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.owner-button--small { padding: 6px 9px; font-size: 13px; }
.owner-button--ghost { color: var(--shn-green); background: white; }
.owner-button--danger { color: #991b1b; border-color: #fecaca; background: #fff1f2; }
.status-pill { display: inline-block; padding: 4px 8px; border-radius: 999px; color: #256033; background: #e7f7e9; font-size: 12px; font-weight: 800; }
.status-pill--off { color: #7f1d1d; background: #fee2e2; }
.status-pill--pending { color: #854d0e; background: #fef9c3; }
.status-pill--confirmed, .status-pill--preparing { color: #1e40af; background: #dbeafe; }
.status-pill--shipped { color: #5b21b6; background: #ede9fe; }
.status-pill--delivered { color: #166534; background: #dcfce7; }
.status-pill--cancelled { color: #991b1b; background: #fee2e2; }
.owner-form { display: grid; gap: 16px; max-width: 860px; }
.owner-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.owner-form label { display: grid; gap: 6px; color: #294430; font-weight: 700; }
.owner-form input, .owner-form textarea, .owner-form select { width: 100%; padding: 10px 11px; border: 1px solid #b8c8bc; border-radius: 8px; background: white; font: inherit; }
.owner-form .check-label { display: flex; align-items: center; gap: 8px; }
.owner-form .check-label input { width: auto; }
.owner-checks { display: flex; flex-wrap: wrap; gap: 20px; }
.owner-form--inline { max-width: none; grid-template-columns: 1.1fr 1fr 1.6fr auto auto; align-items: end; }
.owner-image-preview { width: 130px; height: 110px; object-fit: contain; border: 1px solid var(--shn-line); border-radius: 9px; }
.owner-category { margin-bottom: 14px; }
.owner-category summary { cursor: pointer; color: #173f25; font: 700 19px "Oswald", sans-serif; }
.owner-category form { margin-top: 15px; }
.owner-category-create { margin-bottom: 18px; }
.owner-category summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.owner-category summary small { color: var(--shn-muted); font: 600 13px "Source Sans 3", Arial, sans-serif; }
.owner-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at top, #2f5e3b, #0f2216 65%); }
.owner-login__card { width: min(430px, 100%); padding: 34px; background: white; border-radius: 16px; box-shadow: 0 30px 80px rgb(0 0 0 / 30%); }
.owner-login__brand { text-align: center; }
.owner-login__brand img { width: 96px; height: 80px; object-fit: contain; }
.owner-login h1 { text-align: center; color: #173f25; }
.owner-login p { text-align: center; color: var(--shn-muted); }
.owner-login form { display: grid; gap: 14px; }
.owner-login label { display: grid; gap: 5px; font-weight: 700; }
.owner-login input { padding: 11px; border: 1px solid #afc0b3; border-radius: 8px; font: inherit; }
.order-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.order-meta p { margin: 0; padding: 12px; background: #f6f9f7; border-radius: 8px; }
.order-meta p span { display: block; margin-bottom: 4px; color: var(--shn-muted); font-size: 13px; }
.owner-status-form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.owner-status-form label { display: grid; gap: 5px; font-weight: 700; }
.owner-status-form select { min-width: 210px; padding: 9px 11px; border: 1px solid #b8c8bc; border-radius: 8px; background: white; font: inherit; }
.owner-order-items { margin-top: 18px; }
.owner-empty { margin: 0; padding: 28px; color: var(--shn-muted); text-align: center; }
.owner-error { max-width: 720px; margin: 10vh auto 0; text-align: center; }
.form-success { padding: 12px 15px; margin-bottom: 16px; color: #166534; background: #ecfdf3; border: 1px solid #bbf7d0; border-radius: 8px; }

@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-layout, .product-detail { grid-template-columns: 1fr; }
  .owner-shell { grid-template-columns: 1fr; }
  .owner-sidebar { position: static; height: auto; }
  .owner-nav { grid-template-columns: repeat(3, 1fr); }
  .owner-logout { position: static; margin-top: 14px; }
  .owner-stats { grid-template-columns: repeat(2, 1fr); }
  .owner-form--inline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .catalog-grid, .owner-form-grid, .owner-stats { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 70px 1fr; }
  .cart-row form, .cart-row > strong { grid-column: 2; }
  .cart-row img { width: 70px; }
  .shop-footer { flex-direction: column; }
  .owner-nav { grid-template-columns: 1fr 1fr; }
  .owner-content { padding: 20px 14px; }
  .owner-header { align-items: start; flex-direction: column; }
  .order-meta { grid-template-columns: 1fr; }
  .owner-form--inline { grid-template-columns: 1fr; }
}
