/*
 * Тема «Тетрадь» (по мотивам «бумажных» шаблонов канцтоваров, рисунки свои).
 * Подключается после styles.css и меняет только внешний вид: тёплая бумага,
 * стикеры с цветным скотчем, рисунки от руки, круглый дружелюбный шрифт.
 * Чтобы вернуть прежний дизайн — уберите строку с theme-notebook.css в resources/views/shop.blade.php.
 */
:root {
  --bg: #fffaf2;
  --bg-2: #f6efe3;
  --ink: #2b2440;
  --ink-2: #5f5870;
  --line: #eadfce;
  --plum: #2b2440;
  --plum-2: #3d3459;
  --accent: #f0643f;
  --accent-deep: #c4421f;
  --accent-soft: #ffe4d8;


  --margin-line: rgba(240, 100, 63, 0.28);
  --tape-a: rgba(255, 207, 63, 0.78);
  --tape-b: rgba(185, 211, 194, 0.85);
  --tape-c: rgba(246, 196, 207, 0.85);
  --note: #fff1a8;

  --display: 'Nunito', 'Manrope', system-ui, sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --r-m: 20px;
  --r-l: 26px;
}

/* ---------- фон: тёплая бумага без клеток ---------- */
body { background: var(--bg); }
.hero::before { display: none; }
.hero::after { /* красная линия полей, как в школьной тетради */
  content: ''; position: absolute; top: 0; bottom: 0; left: max(24px, calc(50% - 660px)); width: 2px;
  background: var(--margin-line); pointer-events: none;
}

h2, .hero__title, .bento__title, .dept__title { font-family: var(--display); font-weight: 900; letter-spacing: -0.01em; }
.hero__title { font-weight: 900; line-height: 1.02; }
.hero__line--b { font-weight: 800; }

/* заголовки секций — подчёркивание «от руки» */
h2 { position: relative; width: fit-content; }
h2::after {
  content: ''; display: block; height: 10px; margin-top: 4px; width: 72%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8c30-6 60-6 92-2s70 4 104-3' fill='none' stroke='%23f0643f' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.order-band h2::after, .hero h2::after { display: none; }

/* ---------- полоса сверху и шапка ---------- */
.promo { background: var(--accent); }
.promo__track span::before { background: #fff !important; }
.header { background: rgba(255, 250, 242, 0.92); }
.logo__mark { border-radius: 14px; transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--ink); }
.logo__text { font-family: var(--display); font-weight: 800; }
.search input { border-style: dashed; border-width: 2px; }
.search input:focus { border-style: solid; }

/* ---------- кнопки: «вырезанные» с тенью-подложкой ---------- */
.btn { border-radius: 999px; font-weight: 800; }
.btn--primary { box-shadow: 0 5px 0 var(--accent-deep); }
.btn--primary:hover { box-shadow: 0 7px 0 var(--accent-deep); }
.btn--primary:active { box-shadow: 0 2px 0 var(--accent-deep); }
.btn--ghost { border-width: 2px; box-shadow: 0 5px 0 var(--ink); }
.btn--ghost:active { box-shadow: 0 2px 0 var(--ink); }
.btn--wa { box-shadow: 0 5px 0 var(--wa-dark); }

/* ---------- рисунки от руки ---------- */
.doodles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.doodle { position: absolute; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: wobble 6s ease-in-out infinite; }
.doodle--star { width: 44px; top: 9%; left: 46%; stroke: #e7a900; fill: rgba(255, 207, 63, 0.35); }
.doodle--sun { width: 70px; top: 6%; right: 3%; stroke: #f0a63f; animation-duration: 9s; }
.doodle--swirl { width: 130px; bottom: 9%; left: 40%; stroke: var(--bt-deep); opacity: 0.55; animation-duration: 7s; }
.doodle--pencil { width: 66px; bottom: 6%; right: 1.5%; stroke: var(--hm-deep); fill: rgba(201, 220, 245, 0.5); }
.doodle--heart { width: 34px; top: 52%; left: 3%; stroke: var(--accent); fill: rgba(240, 100, 63, 0.18); animation-duration: 5s; }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-6px); } }
.hero__grid { z-index: 1; }

.hand-note {
  display: inline-flex; align-items: flex-end; gap: 4px; margin: -8px 0 10px 8px;
  font-family: var(--hand); font-size: 26px; font-weight: 700; color: var(--accent-deep); transform: rotate(-3deg);
}
.hand-note svg { width: 46px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transform: translateY(14px) rotate(14deg); }

/* ---------- стикеры и скотч ---------- */
.bento { position: relative; }
.sticky {
  position: absolute; z-index: 4; top: -22px; left: -18px; max-width: 170px; padding: 14px 16px 18px;
  background: var(--note); color: var(--ink); font-family: var(--hand); font-size: 23px; font-weight: 700; line-height: 1.05;
  transform: rotate(-7deg); box-shadow: 0 10px 18px -8px rgba(43, 36, 64, 0.35);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 88% 100%, 0 100%);
}
.sticky::before { /* скотч */
  content: ''; position: absolute; top: -10px; left: 50%; width: 64px; height: 20px; margin-left: -32px;
  background: var(--tape-b); transform: rotate(4deg);
}

.bento__tile, .dept { border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.bento__tile:hover, .dept:hover { box-shadow: 8px 8px 0 var(--ink); }
.bento__tile::before, .dept::before {
  content: ''; position: absolute; z-index: 5; top: 6px; right: 18%; width: 58px; height: 18px;
  background: var(--tape-a); transform: rotate(-6deg); pointer-events: none;
}
.bento__tile--clothes::before, .dept--clothes::before { background: var(--tape-c); transform: rotate(5deg); }
.bento__tile--beauty::before, .dept--beauty::before { background: var(--tape-b); right: 40%; }
.dept--home::before { background: var(--tape-c); transform: rotate(3deg); }
.bento__photos img { border: 5px solid #fff; box-shadow: 0 8px 16px -6px rgba(43, 36, 64, 0.35); }
.bento__count { border: 1.5px solid var(--ink); }

/* преимущества — значки в пунктирных кружках */
.trust li { border: 2px dashed var(--line); background: rgba(255, 255, 255, 0.75); }
.trust__dot { background: var(--note); box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- карточки товаров: наклейки ---------- */
.card { border: 2px solid var(--line); border-radius: var(--r-m); background: #fff; }
.card::before {
  content: ''; position: absolute; z-index: 3; top: -8px; left: 50%; width: 54px; height: 16px; margin-left: -27px;
  background: var(--tape-a); opacity: 0; transform: rotate(-4deg) translateY(4px);
  transition: opacity var(--fast), transform var(--mid) var(--ease); pointer-events: none;
}
.card[data-dept="beauty"]::before { background: var(--tape-c); }
.card[data-dept="home"]::before, .card[data-dept="clothes"]::before { background: var(--tape-b); }
.card:hover { border-color: var(--ink); box-shadow: 5px 5px 0 var(--ink); transform: translateY(-3px) rotate(-0.5deg); }
.card:nth-child(even):hover { transform: translateY(-3px) rotate(0.5deg); }
.card:hover::before { opacity: 1; transform: rotate(-4deg) translateY(0); }
.card__media { border-radius: 14px; }

/* вкладки и чипсы — как цветные закладки */
.tab { border-width: 2px; font-weight: 800; }
.tab[aria-selected="true"] { box-shadow: 3px 3px 0 var(--accent); }

/* блок «под заказ» и наборы — тетрадный лист с полями */
.order-band { background-image: linear-gradient(90deg, transparent 38px, var(--margin-line) 38px, var(--margin-line) 40px, transparent 40px); }

/* подвал — рваный край бумаги */
.footer { position: relative; background: #fff; border-top: 0; margin-top: 24px; }
.footer::before {
  content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 15px; background: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 15' preserveAspectRatio='none'%3E%3Cpath d='M0 15V8l5-5 6 6 7-8 6 7 5-4 6 6 5-5v15z'/%3E%3C/svg%3E") repeat-x bottom / 40px 15px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 15' preserveAspectRatio='none'%3E%3Cpath d='M0 15V8l5-5 6 6 7-8 6 7 5-4 6 6 5-5v15z'/%3E%3C/svg%3E") repeat-x bottom / 40px 15px;
}

/* ---------- телефон ---------- */
@media (max-width: 900px) {
  .hero::after { left: 10px; }
  .doodle--star { left: auto; right: 22%; top: 2%; }
  .doodle--swirl, .doodle--heart { display: none; }
  .sticky { top: -16px; left: -6px; font-size: 20px; max-width: 150px; }
}
@media (max-width: 640px) {

  .doodle--sun { width: 48px; top: 2%; }
  .doodle--pencil, .doodle--star { display: none; }
  .hand-note { font-size: 22px; }
  .bento__tile, .dept { box-shadow: 4px 4px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .doodle { animation: none; }
  .card:hover, .card:nth-child(even):hover { transform: none; }
}
