/* =========================================================
   maskashop.by — Dark Glass / Premium iOS Style
   ========================================================= */

/* ===== Reset ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html, body { overflow-x: hidden; }

img { max-width: 100%; display: block; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.svg-sprite{
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
}

/* ===== Theme ===== */
:root{
  --maxw: 1200px;

  --bg: #06070b;
  --bg-2: #0b1020;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.05);
  --surface-3: rgba(255,255,255,0.12);

  --text: rgba(255,255,255,0.96);
  --muted: rgba(255,255,255,0.62);

  --border: rgba(255,255,255,0.14);
  --border-soft: rgba(255,255,255,0.10);

  --accent: #69b7ff;
  --accent-2: #3b82f6;
  --accent-3: #8b5cf6;
  --accent-grad: linear-gradient(135deg, rgba(105,183,255,0.95), rgba(59,130,246,0.95), rgba(139,92,246,0.88));

  --glass-blur: blur(18px);
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
  --shadow-soft: 0 12px 30px rgba(0,0,0,0.30);

  --radius: 24px;
  --radius-sm: 18px;
}

html{
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 20%, rgba(59,130,246,0.20), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(139,92,246,0.18), transparent 22%),
    radial-gradient(circle at 50% 75%, rgba(96,165,250,0.16), transparent 28%),
    linear-gradient(180deg, #05060a 0%, #080b12 45%, #05060a 100%);
}

body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.4;
  position: relative;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.05), transparent 18%),
    radial-gradient(circle at 68% 62%, rgba(105,183,255,0.08), transparent 24%);
  filter: blur(40px);
  z-index: 0;
}

.page, .site-header, .site-footer, .cart-overlay{
  position: relative;
  z-index: 1;
}

.muted{ color: var(--muted); }

/* ===== Container ===== */
.container{
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
}

@media (min-width: 680px){
  .container{
    padding-left: calc(24px + env(safe-area-inset-left));
    padding-right: calc(24px + env(safe-area-inset-right));
  }
}

/* ===== Header ===== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 12px;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

.header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 10px 30px rgba(0,0,0,0.28);
}

.logo{
  font-weight: 800;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}

.logo-sub{
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

/* ===== Cart button ===== */
.cart-icon{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 8px 24px rgba(0,0,0,0.24);
  transition: .2s ease;
  flex: 0 0 auto;
}

.cart-icon .icon{
  width: 20px;
  height: 20px;
  color: #fff;
}

.cart-icon:hover{
  transform: translateY(-1px) scale(1.01);
  border-color: rgba(105,183,255,0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 12px 30px rgba(0,0,0,0.30),
    0 0 24px rgba(59,130,246,0.12);
}

.cart-icon.is-open{
  background: rgba(105,183,255,0.14);
  border-color: rgba(105,183,255,0.30);
}

.cart-icon.has-items{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 8px 24px rgba(0,0,0,0.24),
    0 0 20px rgba(105,183,255,0.14);
}

.cart-badge{
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  background: rgba(255,255,255,0.92);
  color: #0b1020;
  border: 1px solid rgba(255,255,255,0.22);
}

.cart-badge.pop { animation: badgePop 180ms ease-out; }
@keyframes badgePop{
  0%{ transform: scale(1); }
  60%{ transform: scale(1.18); }
  100%{ transform: scale(1); }
}

/* ===== Page ===== */
.page{
  flex: 1;
  padding: 34px 0 42px;
}

.page-head{
  margin-bottom: 26px;
}

.page-head h1{
  font-size: 40px;
  line-height: 1.05;
  margin-bottom: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.page-head p{
  font-size: 15px;
}

/* ===== Product grid ===== */
.product-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

/* планшеты */
@media (max-width: 992px){
  .product-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* мобилка */
@media (max-width: 680px){
  .product-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* ← вот ключевое изменение */
    gap: 14px;
  }

  .page-head h1{
    font-size: 30px;
  }
}

/* очень маленькие экраны (по желанию) */
@media (max-width: 360px){
  .product-grid{
    grid-template-columns: 1fr;
  }
}
/* ===== Product card ===== */
.product-card{
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 20px 40px rgba(0,0,0,0.32);
  display: flex;
  flex-direction: column;
  transition: .25s ease;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.product-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), transparent 34%, transparent 66%, rgba(255,255,255,0.05)),
    radial-gradient(circle at top left, rgba(105,183,255,0.12), transparent 30%);
  pointer-events: none;
}

.product-card:hover{
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(105,183,255,0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 24px 50px rgba(0,0,0,0.36),
    0 0 30px rgba(59,130,246,0.12);
}

.product-card .card-actions,
.product-card .card-actions * { cursor: default; }
.product-card .card-actions a,
.product-card .card-actions button { cursor: pointer; }

.image-wrapper{
  width: 100%;
  aspect-ratio: 4 / 5;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.image-wrapper img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.product-card h3{
  padding: 16px 18px 6px;
  font-size: 18px;
  line-height: 1.25;
  min-height: 2.8em;
  font-weight: 700;
  color: rgba(255,255,255,0.96);
  letter-spacing: -0.01em;
}

.price{
  padding: 0 18px 16px;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}

/* ===== Bottom actions ===== */
.card-actions{
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
}

.card-action{
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 14px;
  transition: .18s ease;
}

.card-action.left{
  flex: 1;
}

.card-action.right{
  width: 46px;
  flex: 0 0 46px;
  padding: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.16);
}

.card-action:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
  border-color: rgba(105,183,255,0.28);
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

.card-action.right .icon-cart{
  width: 20px;
  height: 20px;
  color: #fff;
}

.add-to-cart.added,
.add-to-cart.in-cart{
  background: rgba(105,183,255,0.20) !important;
  border-color: rgba(105,183,255,0.40) !important;
  color: #fff !important;
  box-shadow: 0 0 24px rgba(105,183,255,0.12) !important;
}

.add-to-cart.added::after{
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
}
.add-to-cart.added .icon{ opacity: 0; }

/* ===== Cart Drawer ===== */
.cart-overlay{
  position: fixed;
  inset: 0;
  background: rgba(3,6,12,.58);
  display: none;
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cart-drawer{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 94vw);
  background: rgba(10,12,18,0.78);
  border-left: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: -20px 0 50px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
}

.cart-header{
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cart-title-main{
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.cart-title-sub{
  font-size: 13px;
  margin-top: 4px;
}

.close-btn{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: .18s ease;
}
.close-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
}

.cart-body{
  padding: 14px 16px 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-empty{
  padding: 18px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 20px;
  text-align: center;
  background: rgba(255,255,255,0.05);
}

.cart-empty-emoji{ font-size: 28px; }
.cart-empty-title{
  font-weight: 800;
  margin-top: 8px;
  color: #fff;
}

.cart-list{
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item{
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 10px;
  background: rgba(255,255,255,0.06);
  display: grid;
  grid-template-columns: 56px 1fr 36px;
  gap: 10px;
  align-items: center;
  backdrop-filter: blur(14px);
}

.cart-item-img{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
}

.cart-item-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info{
  min-width: 0;
  display: grid;
  gap: 4px;
}

.cart-item-name{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: #fff;
}

.cart-item-price{
  font-weight: 700;
  font-size: 13px;
  color: rgba(255,255,255,0.72);
}

.remove-item{
  justify-self: end;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  transition: .18s ease;
  display: grid;
  place-items: center;
}

.remove-item .icon{
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.78);
}

.remove-item:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
}

.cart-summary{
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}

.cart-total-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

#cart-total{
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

/* ===== Form ===== */
.order-form{
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  padding: 14px 12px;
  backdrop-filter: blur(14px);
}

.order-form label{
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.84);
}

.order-form input{
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0 14px;
  outline: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  transition: .16s ease;
}

.order-form input::placeholder{
  color: rgba(255,255,255,0.36);
}

.order-form input:focus{
  border-color: rgba(105,183,255,0.42);
  background: rgba(255,255,255,0.11);
  box-shadow: 0 0 0 4px rgba(105,183,255,0.12);
}

.checkbox{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(255,255,255,0.72);
}

.checkbox input{
  margin-top: 2px;
  width: 14px;
  height: 14px;
  accent-color: #69b7ff;
}

.checkbox a{
  color: #9ed0ff;
  font-weight: 700;
}
.checkbox a:hover{ text-decoration: underline; }

.error-message{
  font-size: 12px;
  color: #ff8f8f;
}

.error{
  border-color: rgba(255,130,130,.65) !important;
}

.btn-primary{
  height: 48px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.12));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 12px 24px rgba(0,0,0,0.26);
  backdrop-filter: blur(12px);
}

.btn-primary:hover{
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.14));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 16px 30px rgba(0,0,0,0.30),
    0 0 24px rgba(105,183,255,0.12);
}

.full-width{ width: 100%; }

/* ===== Toast ===== */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ===== Footer ===== */
.site-footer{
  margin-top: 34px;
  background: transparent;
  border-top: none;
}

.site-footer .container{
  margin-bottom: 20px;
}

.footer-grid{
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 18px 40px rgba(0,0,0,0.26);
}

.footer-left, .footer-right { min-width: 0; }

.footer-logo{
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 20px;
  color: #fff;
}

.footer-left p,
.footer-right p{
  font-size: 14px;
  color: rgba(255,255,255,0.68);
  margin-bottom: 6px;
}

.footer-socials{
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.footer-socials a{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
  transition: .18s ease;
}

.footer-socials a:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
  border-color: rgba(105,183,255,0.24);
}

.footer-socials img{
  width: 22px;
  height: 22px;
}

.footer-right a{
  color: #9ed0ff;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-right a:hover{ text-decoration: underline; }

.footer-links{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-link{
  font-size: 14px;
  color: rgba(255,255,255,0.64);
}

.footer-link:hover{
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 860px){
  .footer-grid{
    grid-template-columns: 1fr;
    padding: 20px;
  }
}