:root {
  --pink:#f7d9da;
  --accent:#ffdfe2;
  --text:#222;
  --muted:#666;
  --card-radius:14px;
  --container:1100px;
}

* {
  box-sizing:border-box;
  font-family:Inter, Arial, Helvetica, sans-serif;
}

body {
  margin:0;
  color:var(--text);
  background:#fff;
  line-height:1.4;
}

.header {
  background:#fff;
  border-bottom:1px solid #f2dede;
  position:sticky;
  top:0;
  z-index:10;
}

.nav {
  max-width:var(--container);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 20px;
}

.nav .links {
  display:flex;
  gap:18px;
  align-items:center;
}

.logo {
  font-size:30px;
  font-weight:700;
  letter-spacing:1px;
}

.hero {
  background:var(--pink);
  padding:40px 20px;
  text-align:center;
}

.hero img {
  max-width:100%;
  height:260px;
  object-fit:cover;
  border-radius:10px;
  display:block;
  margin:10px auto;
}

.container {
  max-width:var(--container);
  margin:30px auto;
  padding:0 20px;
}

.section-title {
  text-align:center;
  font-size:22px;
  margin-bottom:18px;
}

.cards {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
}

.card {
  background:var(--accent);
  padding:16px;
  border-radius:14px;
  width:220px;
  box-shadow:0 6px 18px rgba(0,0,0,0.06);
  text-align:center;
  position:relative;
  overflow:hidden;
}

.btn.small{
  padding:6px 10px;
  border-radius:10px;
  font-size:13px;
}

.card-actions{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:10px;
}



.empty{
  background:#fff;
  border:1px solid #f0d6d7;
  padding:14px;
  border-radius:12px;
  text-align:center;
}

.card img {
  width:140px;
  height:140px;
  object-fit:cover;
  border-radius:10px;
  background:#eee;
  margin:0 auto;
}

.btn {
  display:inline-block;
  margin-top:10px;
  padding:8px 14px;
  border-radius:12px;
  background:#fff;
  text-decoration:none;
  color:var(--text);
  font-weight:600;
  border:1px solid #f3c9cc;
}

.sidebar {
  background:var(--accent);
  padding:18px;
  border-radius:10px;
  width:220px;
}

.layout {
  display:flex;
  gap:24px;
  align-items:flex-start;
}

footer {
  background:#f7d7d8;
  padding:18px;
  margin-top:40px;
}

.product-photo {
  max-width:360px;
  border-radius:12px;
  overflow:hidden;
}

.product-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:start;
}

.table {
  width:100%;
  border-collapse:collapse;
}

.table th,
.table td {
  padding:8px;
  border:1px solid #f2d2d3;
  text-align:left;
}

.reviews {
  background:#fff;
  padding:12px;
  border-radius:10px;
  max-height:200px;
  overflow:auto;
  border:1px solid #f0d6d7;
}

.review{
  padding:10px 10px 9px;
  border:1px solid #f3d7d8;
  border-radius:12px;
  margin-bottom:10px;
  background:#fff;
}
.review:last-child{ margin-bottom:0; }
.review-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:6px;
}
.review-author{ font-weight:700; }
.review-rating{ color:#b3003b; font-weight:700; }
.review-text{ font-size:13px; color:#333; }
.review-date{ margin-top:6px; font-size:12px; opacity:.7; }

@media (max-width:900px) {
  .product-grid { grid-template-columns:1fr;
  align-items:center;
}

.layout {
  flex-direction:column;
}

.sidebar {
  width:100%;
}

} /* LUTIC branding */ .header .logo {
  font-family: 'Georgia', serif;
  color:#b3003b;
  letter-spacing:2px;
  font-size:28px;
}

.header .links a {
  color: #333;
  text-decoration:none;
  padding:6px 10px;
  border-radius:8px;
  transition:background .18s;
}

.header .links a:hover {
  background:rgba(179,0,59,0.06);
}

.why-card {
  background:linear-gradient(180deg, #fff0f2, #fff6f7);
  padding:22px;
  border-radius:18px;
  box-shadow:0 8px 30px rgba(179,0,59,0.06);
  max-width:900px;
  margin:0 auto;
  text-align:left;
}

.footer-grid {
  display:flex;
  gap:20px;
  align-items:flex-start;
  justify-content:space-between;
  max-width:1100px;
  margin:0 auto;
  padding:18px 20px;
}

.footer-logo img {
  height:44px;
  width:44px;
  border-radius:8px;
  object-fit:cover;
}

.filter-box {
  background:linear-gradient(180deg,#fff4f6,#fff);
  padding:16px;
  border-radius:12px;
  box-shadow:0 6px 18px rgba(0,0,0,0.04);
  width:240px;
}

.category-list button {
  display:block;
  width:100%;
  text-align:left;
  padding:8px 10px;
  margin:6px 0;
  border-radius:999px;
  border:1px solid #f4c9cc;
  background:#fff;
  font-weight:600;
}

.color-swatch {
  display:inline-block;
  width:26px;
  height:26px;
  border-radius:50%;
  margin-right:6px;
  border:2px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.product-grid .product-photo {
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 12px 28px rgba(179,0,59,0.06);
}

.account-profile {
  background:#fff;
  padding:14px;
  border-radius:12px;
  box-shadow:0 6px 18px rgba(0,0,0,0.04);
}

/* ===== ЛР2 дополнения ===== */
[data-products-status]{margin:10px 0;padding:10px;border-radius:12px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.06);display:none}
.cards .meta{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;opacity:.8;margin-bottom:10px}
.cards .meta span{background:#f7f7fb;padding:4px 8px;border-radius:999px}
.pager{display:flex;align-items:center;gap:10px;justify-content:center;margin:16px 0}
.pager button{padding:8px 12px;border-radius:12px;border:1px solid #eee;background:#fff;cursor:pointer}
.pager button:disabled{opacity:.5;cursor:not-allowed}
.empty{padding:14px;border-radius:12px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.06)}



/* --- Modal (сценарий: загрузка отзывов) */
.modal[hidden]{ display:none; }
.modal{
  position:fixed;
  inset:0;
  z-index:1000;
}
.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.35);
}
.modal-panel{
  position:relative;
  width:min(720px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  margin:12px auto;
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 18px 60px rgba(0,0,0,.22);
  display:flex;
  flex-direction:column;
}
.modal-header{
  padding:14px 16px;
  border-bottom:1px solid #f0e6e8;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.modal-title{ font-weight:800; }
.modal-subtitle{ font-size:13px; color:var(--muted); margin-top:2px; }
.modal-body{
  padding:14px 16px;
  overflow:auto;
}
.modal-status{ color:var(--muted); margin-bottom:10px; }

.card-actions{ margin-top:10px; }
.btn.small{ padding:8px 10px; font-size:13px; border-radius:10px; }

.reviews{ display:flex; flex-direction:column; gap:10px; }
.review{
  border:1px solid #f0e6e8;
  border-radius:14px;
  padding:10px 12px;
}
.review-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.review-author{ font-weight:700; }
.review-rating{ font-size:13px; color:#111; opacity:.85; }
.review-text{ margin-top:6px; }
.review-date{ margin-top:6px; font-size:12px; color:var(--muted); }



.reviews-panel {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border, #ddd);
  background: var(--card, #fff);
}

.review-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border, #ddd);
}
.review-item:last-child { border-bottom: none; }

.review-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  font-weight: 600;
}

.review-rating {
  font-weight: 700;
}

.card-link{
  color: inherit;
  text-decoration: none;
  display: block;
}
.card-link:hover h4{
  text-decoration: underline;
}



.product-title{
  margin: 0 0 18px 0;
  text-align: center; /* если хочешь слева — поменяй на left */
}

/* контейнер кнопок фильтра */
.sidebar form > div{
    display: grid;
    grid-template-columns: 1fr 1fr;   /* 2 равные кнопки */
    gap: 10px;
    width: 100%;
}

/* сами кнопки */
.sidebar form .btn{
    width: 100%;
    min-width: 0;      /* КЛЮЧЕВОЕ — убирает выталкивание */
    padding: 10px 0;
    text-align: center;
}

/* кнопка сброса */
.sidebar form [data-reset]{
    white-space: nowrap;
}

/* ===== Карточка: выравнивание заголовка и цены ===== */
.card{
  position: relative;
  display: flex;
  flex-direction: column;
}

/* фикс высоты под 2 строки названия */
.card-title{
  min-height: 44px;
  line-height: 1.2;
  margin: 10px 0 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* цена на одном уровне */
.card-price{
  margin-top: auto;
  padding-top: 8px;
}

/* ===== Избранное: одно сердечко (рисуем только CSS) ===== */
.fav-btn{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.95);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  z-index: 5;
}

.fav-btn::before{
  content: "♡";
  font-size: 18px;
  line-height: 1;
  color: #ba1717;
}

.fav-btn.active{
  background: #ffe3ea;
  border-color: rgba(0,0,0,.06);
}

.fav-btn.active::before{
  content: "♥";
}

/* ===== Tooltip “Кратко” (чтобы не было белых полос) ===== */
.info-badge{
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(0,0,0,.08);
  font-weight: 700;
  cursor: default;
}

.info-badge .tooltip{
  position: absolute;
  right: 0;
  bottom: 34px;
  width: 220px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 18px 45px rgba(0,0,0,.15);
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: .15s ease;
  z-index: 10;
}

.info-badge:hover .tooltip{
  opacity: 1;
  
}

/* на всякий случай — если где-то остался старый card-hover */
.card-hover{ display:none !important; }


/* ===== Toast уведомление ===== */
.toast{
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ===== Админка: восстановление дизайна ===== */
.admin-form{
  max-width: 980px;
  margin: 0 auto;
}

.field{
  display: block;
  margin-bottom: 16px;
}

.field span{
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #3a3a3a;
}

.admin-form input,
.admin-form select,
.admin-form textarea{
  width: 100%;
  border: 1px solid #f0cfd5;
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-sizing: border-box;
}

.admin-form textarea{
  resize: vertical;
  min-height: 120px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus{
  border-color: #d96c83;
  box-shadow: 0 0 0 3px rgba(217,108,131,.12);
}

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

.btn-light{
  background: #fff !important;
  color: #222 !important;
  border: 1px solid #eee !important;
  text-decoration: none;
}

.form-message{
  max-width: 980px;
  margin: 0 auto 18px auto;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  border: 1px solid #f0cfd5;
  background: #fff;
}

.form-message.ok{
  border-color: #b9dfc0;
  background: #f1fbf3;
  color: #256c34;
}

.form-message.err{
  border-color: #f0cfd5;
  background: #fff7f8;
  color: #a33a4b;
}

.admin-hint{
  font-size: 12px;
  opacity: .75;
  margin-top: 10px;
}

/* ===== Финальная версия tooltip для краткой инфы ===== */

.card{
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.cards{
  overflow: visible;
}

.meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.info-badge{
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(0,0,0,.08);
  font-weight: 700;
  cursor: default;
  flex-shrink: 0;
  z-index: 6;
}

.info-badge .tooltip{
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 180px;
  max-width: 180px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  color: #222;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  pointer-events: none;
  word-break: break-word;
  z-index: 20;
}

.info-badge:hover .tooltip{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.info-badge .tooltip::after{
  content: "";
  position: absolute;
  right: 10px;
  top: 100%;
  border-width: 7px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

/* ===== Личный кабинет ===== */
.account-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

.account-box {
    background: linear-gradient(180deg, #fff4f6, #fff);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

.account-box-title {
    margin: 0 0 14px;
    font-size: 22px;
}

.account-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.account-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.account-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 14px;
}

.account-field input {
    width: 100%;
    border: 1px solid #f0cfd5;
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
    font-size: 15px;
}

.account-status {
    margin-bottom: 14px;
    color: var(--muted);
}

.favorites-table-wrap {
    overflow-x: auto;
    margin-bottom: 18px;
}

.favorites-table td,
.favorites-table th {
    vertical-align: middle;
}

.favorites-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    background: #eee;
}

.favorites-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

    .favorites-link:hover {
        text-decoration: underline;
    }

.account-favorites-cards {
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
}

.card-link{color:inherit;text-decoration:none;display:block;}
.card .fav-btn, .card .cart-icon-btn{position:absolute;top:10px;width:34px;height:34px;border:none;border-radius:50%;cursor:pointer;box-shadow:0 8px 18px rgba(0,0,0,.08);background:#fff;display:flex;align-items:center;justify-content:center;z-index:2;}
.card .fav-btn{right:10px;}
.card .cart-icon-btn{left:10px;}

.card .fav-btn::before{content:"♡";font-size:18px;line-height:1;color:#b3003b;}
.card .fav-btn.active::before{content:"❤";}
.meta{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;}
.info-badge{position:relative;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;border:1px solid #f0cfd4;font-weight:700;cursor:pointer;}
.tooltip{display:none;position:absolute;left:50%;bottom:130%;transform:translateX(-50%);width:190px;padding:10px 12px;border-radius:12px;background:#fff;border:1px solid #f0d6d7;box-shadow:0 12px 30px rgba(0,0,0,.10);font-size:12px;z-index:10;text-align:left;}
.info-badge:hover .tooltip,.info-badge:focus-within .tooltip{display:block;}
.toast{position:fixed;right:20px;bottom:20px;background:#222;color:#fff;padding:12px 16px;border-radius:12px;box-shadow:0 10px 25px rgba(0,0,0,.2);z-index:99;}

.cart-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start;}
.cart-items{display:grid;gap:16px;}
.cart-item{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:16px;align-items:center;background:#fff0f4;border:1px solid #f3d7dc;border-radius:18px;padding:16px;overflow:hidden;}
.cart-item-image{width:120px;height:120px;object-fit:cover;border-radius:14px;background:#fff;}
.cart-item-main h3{margin:0 0 6px;font-size:20px;}
.cart-item-category{margin:0 0 12px;color:#666;}
.cart-item-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.qty-btn,.cart-remove{border:none;cursor:pointer;border-radius:10px;padding:8px 12px;background:#fff;}
.qty-value{min-width:22px;text-align:center;font-weight:700;}
.cart-item-price{font-size:22px;font-weight:700;white-space:nowrap;}
.cart-summary{background:#ffdfe2;border-radius:18px;padding:18px;position:sticky;top:95px;}
.cart-summary h3{margin-top:0;}
.cart-summary-actions{display:grid;gap:10px;margin-top:16px;}
@media (max-width:900px){.cart-layout{grid-template-columns:1fr;}.cart-item{grid-template-columns:1fr;}.cart-item-image{width:100%;height:220px;}.cart-item-price{justify-self:start;}}


/* fixed icon buttons on product cards */
.card .fav-btn,
.card .cart-icon-btn{
  width:36px;
  min-width:36px;
  max-width:36px;
  height:36px;
  min-height:36px;
  padding:0;
  margin:0;
  border:none;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  flex:0 0 36px;
}

.card .fav-btn::before{font-size:18px;line-height:1;}
.card-link img{
  width:140px;
  height:140px;
  object-fit:cover;
  display:block;
  margin:0 auto;
  border-radius:10px;
}

.card .cart-icon-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    display: block !important;
    z-index: 3;
    cursor: pointer;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ba1717' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='17' cy='20' r='1'/%3E%3Cpath d='M3 4h2l2.2 10.2a1 1 0 0 0 1 .8h8.9a1 1 0 0 0 1-.8L20 7H7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.08) !important;
}

    .card .cart-icon-btn::before,
    .card .cart-icon-btn::after {
        content: none !important;
        display: none !important;
    }

    .card .cart-icon-btn:hover {
        transform: scale(1.06);
        box-shadow: 0 8px 18px rgba(186,23,23,.18);
    }

.card .cart-icon-btn {
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}


    .card .cart-icon-btn.added {
        animation: cart-pop .35s ease;
    }

@keyframes cart-pop {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.18);
    }

    70% {
        transform: scale(.92);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== Страница товара: фиксированный размер изображения ===== */
.product-page {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

.product-media {
    width: 320px;
}

.product-img {
    width: 320px !important;
    height: 320px !important;
    object-fit: cover !important;
    display: block;
    border-radius: 16px;
    background: #eee;
}

@media (max-width: 900px) {
    .product-page {
        grid-template-columns: 1fr;
    }

    .product-media {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .product-img {
        width: 100% !important;
        height: 320px !important;
    }
}