/* Styles communs Madawork.com — 2026-08-10 */
:root {
  --mw-blue: #17438f;
  --mw-blue-dark: #071b39;
  --mw-blue-soft: #eef4fb;
  --mw-orange: #ff9800;
  --mw-green: #129447;
  --mw-red: #d93025;
  --mw-purple: #6f35d6;
  --mw-bg: #f3f7fc;
  --mw-card: #ffffff;
  --mw-line: #dce6f2;
  --mw-text: #10233f;
  --mw-muted: #667085;
  --mw-shadow: 0 12px 34px rgba(15, 43, 81, .09);
  --mw-radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Poppins, Arial, sans-serif;
  color: var(--mw-text);
  background: var(--mw-bg);
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--mw-blue); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.container, .wrap {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
  padding: 24px 0 48px;
}

.mw-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--mw-line);
  box-shadow: 0 6px 24px rgba(7, 27, 57, .07);
  backdrop-filter: blur(14px);
}
.mw-header-inner {
  width: min(1320px, calc(100% - 28px));
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.mw-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mw-blue-dark);
  text-decoration: none;
  font-weight: 800;
  flex: 0 0 auto;
}
.mw-brand img { width: 154px; height: 54px; object-fit: contain; }
.mw-brand span { display: none; font-size: 11px; }
.mw-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}
.mw-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 11px;
  color: var(--mw-blue-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.mw-nav a:hover { background: var(--mw-blue-soft); color: var(--mw-blue); }
.mw-nav .shop { background: #fff3d9; color: #7a4300; }
.mw-nav .account { background: var(--mw-blue); color: #fff; }
.mw-nav .account:hover { background: var(--mw-blue-dark); color: #fff; }
.mw-menu-button {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--mw-blue);
  font-size: 21px;
  cursor: pointer;
}

.mw-footer { margin-top: 28px; background: var(--mw-blue-dark); color: #fff; }
.mw-footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: auto;
  padding: 34px 0 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
.mw-footer img { width: 180px; height: 60px; object-fit: contain; background: #fff; border-radius: 12px; padding: 5px; }
.mw-footer p { max-width: 560px; opacity: .85; }
.mw-footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.mw-footer-links a { color: #fff; text-decoration: none; border: 1px solid #ffffff38; border-radius: 10px; padding: 9px 12px; }
.mw-copyright { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid #ffffff24; opacity: .7; font-size: 12px; }

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(24px, 5vw, 52px);
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--mw-blue-dark), var(--mw-blue) 67%, var(--mw-orange));
  box-shadow: var(--mw-shadow);
}
.hero::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 0 0 10px; font-size: clamp(27px, 5vw, 44px); line-height: 1.15; }
.hero p { max-width: 830px; margin: 0; opacity: .94; }
.hero-actions, .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.hero-actions a {
  padding: 11px 16px;
  border-radius: 12px;
  color: var(--mw-blue-dark);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
}

.section, .form-card, .panel, .box, .detail-panel, .chapter {
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--mw-line);
  border-radius: var(--mw-radius);
  background: var(--mw-card);
  box-shadow: var(--mw-shadow);
}
.section > :first-child, .form-card > :first-child, .panel > :first-child { margin-top: 0; }
.section h2, .form-card h1 { color: var(--mw-blue-dark); }

.grid, .cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--mw-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 43, 81, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(15, 43, 81, .13); }
.card-media, .card-img, .item-img {
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #edf3fb, #dce9fa);
}
.card-media img, .card-img img, .item-img img, img.cardimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
img.cardimg { height: 200px; background: var(--mw-blue-soft); }
.card-body, .cardbody, .item-body { padding: 16px; }
.card h3, .card-body h3 { margin: 10px 0 7px; color: var(--mw-blue-dark); line-height: 1.3; }
.desc { color: var(--mw-muted); white-space: pre-line; }
.meta, .item-info { display: flex; gap: 8px; flex-wrap: wrap; color: var(--mw-muted); font-size: 12px; }
.badge, .tag, .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--mw-blue);
  background: var(--mw-blue-soft);
  font-size: 11px;
  font-weight: 800;
}
.price { margin: 12px 0; color: var(--mw-green); font-size: 20px; font-weight: 900; }
.no-img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--mw-blue);
  font-size: 18px;
  font-weight: 900;
}

.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--mw-line);
  border-radius: 11px;
  color: var(--mw-blue);
  background: #fff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.btn:hover { filter: brightness(.97); }
.btn.primary, .btn.blue, button.primary { border-color: var(--mw-blue); color: #fff; background: var(--mw-blue); }
.btn.green, button.green { border-color: var(--mw-green); color: #fff; background: var(--mw-green); }
.btn.orange, button.orange { border-color: var(--mw-orange); color: #fff; background: var(--mw-orange); }
.btn.red, .btn.danger, button.danger { border-color: var(--mw-red); color: #fff; background: var(--mw-red); }
.btn.purple { border-color: var(--mw-purple); color: #fff; background: var(--mw-purple); }
.btn:disabled, button:disabled { opacity: .55; cursor: wait; }

.filters, .tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters > input, .filters > select { flex: 1 1 220px; }
input, select, textarea, .field {
  width: 100%;
  border: 1px solid #cbd8e9;
  border-radius: 11px;
  color: var(--mw-text);
  background: #fff;
}
input, select, textarea { min-height: 45px; padding: 10px 12px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(23, 67, 143, .13); border-color: var(--mw-blue); }
.field { border: 0; }
.field label { display: block; margin-bottom: 6px; color: var(--mw-blue-dark); font-size: 13px; font-weight: 800; }
.field small { display: block; margin-top: 5px; color: var(--mw-muted); }
.form-grid, .formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field.full, .full { grid-column: 1 / -1; }

.notice, .loading, .empty, .error, .success {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 13px;
  font-weight: 700;
}
.notice { border: 1px solid #f3d98b; color: #795300; background: #fff8dc; }
.notice.success, .success, .ok { border-color: #a9e5c4; color: #087446; background: #eafff3; }
.notice.error, .error, .err { border-color: #f2b6bd; color: #a8132d; background: #fff0f2; }
.loading, .empty { text-align: center; color: var(--mw-muted); background: #f8fafc; }
.loading::before { content: '⏳ '; }

.table-wrap, .tablewrap { overflow: auto; border: 1px solid var(--mw-line); border-radius: 14px; }
table, .table { width: 100%; min-width: 720px; border-collapse: collapse; background: #fff; }
th, td { padding: 11px 12px; border-bottom: 1px solid #edf1f6; text-align: left; vertical-align: top; font-size: 13px; }
th { color: var(--mw-blue-dark); background: #f5f8fc; font-weight: 900; }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.kpi { padding: 16px; border: 1px solid var(--mw-line); border-radius: 16px; background: #fff; box-shadow: var(--mw-shadow); }
.kpi span { display: block; color: var(--mw-muted); font-size: 12px; font-weight: 700; }
.kpi strong, .kpi b { display: block; margin-top: 5px; color: var(--mw-blue-dark); font-size: 24px; }

.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 20px; align-items: start; }
.gallery { overflow: hidden; border: 1px solid var(--mw-line); border-radius: 20px; background: #fff; }
.main-photo { height: min(60vw, 520px); background: var(--mw-blue-soft); }
.main-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px; }
.thumb { flex: 0 0 82px; height: 70px; overflow: hidden; border: 2px solid transparent; border-radius: 10px; cursor: pointer; background: var(--mw-blue-soft); }
.thumb:hover { border-color: var(--mw-orange); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-box { margin-top: 16px; padding: 15px; border-radius: 14px; background: var(--mw-blue-soft); }

.modal { position: fixed; inset: 0; z-index: 2000; display: none; overflow: auto; padding: 20px; background: rgba(7, 27, 57, .7); }
.modal.show, .modal.open { display: block; }
.modal .box, .modalbox { width: min(920px, 100%); margin: 25px auto; background: #fff; }
.hidden { display: none !important; }

@media (max-width: 1000px) {
  .grid, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-menu-button { display: inline-grid; place-items: center; }
  .mw-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 85px);
    overflow: auto;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--mw-line);
    background: #fff;
    box-shadow: 0 16px 28px rgba(7, 27, 57, .14);
  }
  .mw-nav.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mw-nav a { justify-content: center; border: 1px solid var(--mw-line); }
}

@media (max-width: 720px) {
  .container, .wrap { width: min(100% - 22px, 1200px); padding-top: 14px; }
  .mw-header-inner { min-height: 66px; }
  .mw-brand img { width: 128px; height: 48px; }
  .grid, .cards, .form-grid, .formgrid, .detail { grid-template-columns: 1fr; }
  .card-media, .card-img, .item-img { height: 210px; }
  .hero { border-radius: 20px; }
  .section, .form-card, .panel, .box, .detail-panel { border-radius: 17px; padding: 16px; }
  .main-photo { height: 380px; }
  .mw-footer-inner { grid-template-columns: 1fr; }
  .mw-copyright { grid-column: 1; }
}

@media (max-width: 450px) {
  .mw-nav.open { grid-template-columns: 1fr; }
  .hero-actions a, .actions .btn, .actions a.btn { flex: 1 1 100%; }
  .main-photo { height: 310px; }
}
