:root {
  color-scheme: light;
  --ink: #183d2d;
  --muted: #607b6b;
  --surface: #ffffff;
  --canvas: #f3faf4;
  --border: #d4e5d8;
  --accent: #5c9e6e;
  --accent-dark: #2e7146;
  --accent-soft: #e7f5e9;
  --deep: #1d5a3a;
  font-family: "Be Vietnam Pro", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(243, 250, 244, .7), rgba(243, 250, 244, .76)),
    url("./morina.jpg");
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, min(82vw, 70vh);
  background-attachment: fixed, fixed;
}

button { font: inherit; }

.page-shell { width: min(1440px, calc(100% - 2rem)); margin: 0 auto; padding: 1.25rem 0 3rem; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 2.1rem; letter-spacing: -.03em; line-height: 1; }
.brand small { margin-top: .35rem; color: var(--muted); font-size: 1.12rem; }

.hero-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding: 3.4rem 0 3.2rem; }
.catalog-intro { max-width: 48rem; }
h1 { margin: 0; font-family: "Lora", Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 4.3vw, 4.3rem); font-weight: 500; line-height: 1.15; letter-spacing: -.035em; }
.zalo-contact { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; align-items: center; gap: .9rem; width: min(100%, 31rem); padding: .8rem .95rem; border: 1px solid #b9dfc1; border-radius: 1rem; color: var(--ink); background: rgba(255, 255, 255, .78); box-shadow: 0 .7rem 1.6rem rgba(29, 90, 58, .11); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.zalo-contact:hover { transform: translateY(-.15rem); box-shadow: 0 1rem 1.9rem rgba(29, 90, 58, .17); }
.zalo-contact small, .zalo-contact strong { display: block; }
.zalo-contact small { margin-bottom: .16rem; color: var(--accent-dark); font-size: .73rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.zalo-contact strong { font-size: .95rem; line-height: 1.45; }
.zalo-mark { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; overflow: hidden; }
.zalo-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.zalo-arrow { color: var(--accent-dark); font-size: 1.45rem; font-weight: 700; }
.tiktok-video { justify-self: end; width: min(100%, 20rem); overflow: hidden; border: .45rem solid rgba(255, 255, 255, .8); border-radius: 1.3rem; background: #e8f2ea; box-shadow: 0 1.35rem 2.7rem rgba(29, 90, 58, .2); }
.tiktok-video p { margin: 0; padding: .75rem .9rem; color: var(--ink); background: rgba(255, 255, 255, .92); font-family: "Lora", Georgia, serif; font-size: 1rem; font-weight: 600; }
.tiktok-video iframe { display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; }

.catalog-panel { padding: 1rem; border: 1px solid rgba(221, 227, 237, .85); border-radius: 1.35rem; background: rgba(255, 255, 255, .84); box-shadow: 0 1.25rem 3.75rem rgba(23, 35, 60, .08); backdrop-filter: blur(10px); }
.tab-list { display: inline-flex; padding: .25rem; border-radius: .8rem; background: #e8f2ea; }
.tab-button { min-width: 7.5rem; padding: .72rem 1rem; border: 0; border-radius: .6rem; color: #55705f; background: transparent; font-weight: 750; cursor: pointer; }
.tab-button.is-active { color: #fff; background: var(--deep); box-shadow: 0 .2rem .5rem rgba(29, 90, 58, .2); }
.tab-button:focus-visible, .category-button:focus-visible, .pagination button:focus-visible { outline: 3px solid #63ad79; outline-offset: 2px; }

.category-control { display: grid; width: min(100%, 18rem); gap: .45rem; padding: 1.2rem 0 .85rem; color: var(--muted); font-size: .84rem; font-weight: 750; }
.category-control select { width: 100%; min-height: 2.7rem; padding: .55rem 2.6rem .55rem .85rem; border: 1px solid var(--border); border-radius: .7rem; color: var(--ink); background: #fff; font: inherit; cursor: pointer; }
.category-control select:focus-visible { outline: 3px solid #63ad79; outline-offset: 2px; }

.catalog-status { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; min-height: 4.6rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.catalog-status p { margin: 0; font-size: .9rem; }
#catalog-count { color: var(--ink); font-weight: 750; }
.page-label { color: var(--muted); text-align: right; }

.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: .9rem; background: #fff; box-shadow: 0 1rem 2.35rem rgba(29, 90, 58, .2); transition: transform .25s ease, box-shadow .25s ease; }
.product-card:hover { transform: translateY(-.2rem); box-shadow: 0 1.35rem 2.8rem rgba(29, 90, 58, .28); }
.image-wrap { position: relative; display: block; overflow: hidden; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; background: #e8f2ea; cursor: zoom-in; }
.image-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .image-wrap img { transform: scale(1.035); }
.image-wrap:focus-visible { outline: 3px solid #63ad79; outline-offset: -3px; }
.image-fallback { display: grid; width: 100%; height: 100%; place-items: center; padding: 1rem; color: var(--muted); font-size: .88rem; text-align: center; background: linear-gradient(140deg, #e9f4eb, #f9fcf9); }
.card-body { padding: .9rem .9rem 1rem; }
.card-category { display: inline-block; margin-bottom: .55rem; color: var(--accent-dark); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card-title { margin: 0; font-size: 1rem; line-height: 1.35; }
.card-details { display: grid; gap: .36rem; margin-top: .7rem; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.card-details strong { color: var(--ink); font-size: .91rem; }
.empty-state { display: grid; min-height: 16rem; place-content: center; gap: .75rem; grid-column: 1 / -1; color: var(--muted); text-align: center; }
.empty-state span { color: var(--accent); font-size: 1.7rem; }
.empty-state p { margin: 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: 1.4rem .25rem .25rem; }
.pagination button { min-width: 2.3rem; min-height: 2.3rem; padding: .45rem .65rem; border: 1px solid var(--border); border-radius: .55rem; color: var(--ink); background: #fff; font-weight: 750; cursor: pointer; }
.pagination button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.pagination button.is-active { border-color: var(--deep); color: #fff; background: var(--deep); }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.pagination-ellipsis { padding: 0 .15rem; color: var(--muted); }

.image-modal { width: min(90vw, 58rem); max-width: none; padding: 0; border: 0; border-radius: 1rem; background: transparent; overflow: visible; }
.image-modal::backdrop { background: rgba(12, 45, 28, .7); backdrop-filter: blur(3px); }
.image-modal-content { position: relative; overflow: hidden; border-radius: 1rem; background: #fff; box-shadow: 0 1.5rem 4rem rgba(8, 39, 23, .35); }
.image-modal img { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: #e8f2ea; }
.image-modal p { margin: 0; padding: .85rem 3.4rem .9rem 1rem; color: var(--ink); font-weight: 750; }
.image-modal-close { position: absolute; z-index: 1; top: .65rem; right: .65rem; display: grid; width: 2.45rem; height: 2.45rem; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(24, 61, 45, .82); font-size: 1.65rem; line-height: 1; cursor: pointer; }
.image-modal-close:hover { background: var(--deep); }
.image-modal-close:focus-visible { outline: 3px solid #b4efc2; outline-offset: 2px; }

@media (max-width: 980px) { .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .page-shell { width: min(100% - 1rem, 1440px); padding-top: .4rem; }
  .site-header { min-height: 3.75rem; }
  .hero-section { grid-template-columns: 1fr; gap: 1.8rem; padding: 2.5rem .3rem 2.2rem; }
  h1 { font-size: clamp(2.25rem, 11vw, 3.4rem); }
  .tiktok-video { justify-self: center; width: min(100%, 20rem); }
  .catalog-panel { padding: .75rem; border-radius: 1rem; }
  .tab-button { min-width: 6.8rem; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .card-body { padding: .72rem; }
  .card-details { font-size: .78rem; }
  .catalog-status { min-height: 3.25rem; }
  .page-label { font-size: .78rem !important; }
}
