/* ============================================
   SOFABED.UZ — STYLESHEET
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:    #009fa4;
  --teal-dk: #007a7e;
  --teal-lt: #00b9bf;
  --teal-bg: #e6f7f8;
  --dark:    #0d1b2a;
  --dark2:   #1a2f42;
  --white:   #ffffff;
  --gray:    #6b7280;
  --gray-lt: #f4f6f8;
  --border:  #e2e8f0;
  --shadow:  0 2px 16px rgba(0,159,164,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius:  12px;
  --font: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--dark); background: var(--white); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- TOPBAR ---- */
.topbar {
  background: var(--dark);
  color: rgba(255,255,255,.75);
  font-size: .78rem;
  padding: 8px 24px;
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.topbar a { color: var(--teal-lt); }

/* ---- NAV ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--teal);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: 0 4px 20px rgba(0,159,164,0.15); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.logo { font-family: var(--font); font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.logo-sofa { color: var(--dark); }
.logo-bed { color: var(--teal); }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: .88rem; font-weight: 600; color: var(--gray); transition: color .2s; font-family: var(--font); }
.nav-links a:hover, .nav-links a.active { color: var(--teal); }
.nav-phone {
  background: var(--teal); color: var(--white);
  padding: 9px 20px; border-radius: 8px;
  font-size: .82rem; font-weight: 700; white-space: nowrap;
  font-family: var(--font);
  transition: background .2s;
}
.nav-phone:hover { background: var(--teal-dk); }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.burger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; }
.mobile-menu { display: none; flex-direction: column; padding: 12px 24px 20px; border-top: 1px solid var(--border); gap: 4px; }
.mobile-menu a { padding: 10px 0; font-weight: 600; color: var(--dark); border-bottom: 1px solid var(--border); font-family: var(--font); font-size: .9rem; }
.mob-phone { background: var(--teal) !important; color: var(--white) !important; padding: 12px 20px !important; border-radius: 8px; text-align: center; border-bottom: none !important; margin-top: 8px; }
.mobile-menu.open { display: flex; }

/* ---- HERO ---- */
.hero {
  min-height: 88vh;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 60%, #0a3040 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  padding: 80px 24px;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2300b9bf' fill-opacity='0.04'%3E%3Ccircle cx='40' cy='40' r='20'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 2; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(0,185,191,0.15); color: var(--teal-lt);
  border: 1px solid rgba(0,185,191,0.3);
  padding: 7px 18px; border-radius: 100px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 24px; font-family: var(--font);
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800; line-height: 1.1;
  color: var(--white); margin-bottom: 20px;
}
.hero h1 em { color: var(--teal-lt); font-style: normal; }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,.7); max-width: 520px; margin-bottom: 36px; line-height: 1.7; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 52px; }
.btn-main {
  background: var(--teal); color: var(--white);
  padding: 14px 32px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; font-family: var(--font);
  transition: background .2s, transform .2s;
  box-shadow: 0 4px 20px rgba(0,159,164,0.4);
}
.btn-main:hover { background: var(--teal-dk); transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--white);
  padding: 14px 32px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; font-family: var(--font);
  border: 2px solid rgba(255,255,255,.3);
  transition: border-color .2s, background .2s;
}
.btn-outline:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.07); }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hstat { display: flex; flex-direction: column; }
.hstat strong { font-family: var(--font); font-size: 1.8rem; font-weight: 800; color: var(--white); }
.hstat span { font-size: .75rem; color: rgba(255,255,255,.5); margin-top: 2px; }
.hero-shapes { position: absolute; right: 0; top: 0; bottom: 0; width: 40%; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; }
.s1 { width: 400px; height: 400px; background: rgba(0,185,191,0.08); right: -100px; top: -100px; }
.s2 { width: 300px; height: 300px; background: rgba(0,185,191,0.06); right: 100px; bottom: -50px; }
.s3 { width: 150px; height: 150px; background: rgba(0,185,191,0.12); right: 300px; top: 50%; }

/* ---- SECTION COMMONS ---- */
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; font-family: var(--font); }
.sec-head { text-align: center; margin-bottom: 52px; }
.sec-head h2 { font-family: var(--font); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--dark); }

/* ---- CATEGORIES ---- */
.categories { padding: 90px 0; background: var(--white); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cat-card {
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid var(--border); overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer; display: block;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.cat-card.cat-featured { border-color: var(--teal); box-shadow: 0 4px 20px rgba(0,159,164,0.15); }
.cat-img {
  height: 160px; display: flex; align-items: center; justify-content: center;
  position: relative; font-size: 4rem;
}
.cat-img-1 { background: linear-gradient(135deg, #e8f4fd, #c8e6ff); }
.cat-img-2 { background: linear-gradient(135deg, #e6f7f8, #b2eaec); }
.cat-img-3 { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.cat-img-4 { background: linear-gradient(135deg, #f3e5f5, #e1bee7); }
.cat-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--teal); color: var(--white);
  font-size: .68rem; font-weight: 700; padding: 4px 10px; border-radius: 100px;
  font-family: var(--font);
}
.cat-info { padding: 20px; }
.cat-info h3 { font-family: var(--font); font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.cat-info p { font-size: .82rem; color: var(--gray); margin-bottom: 12px; line-height: 1.5; }
.cat-link { font-size: .82rem; font-weight: 700; color: var(--teal); font-family: var(--font); }

/* ---- WHY ---- */
.why { padding: 90px 0; background: var(--gray-lt); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 28px;
  transition: transform .25s, box-shadow .25s;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal); }
.why-icon { font-size: 2.2rem; margin-bottom: 14px; }
.why-card h4 { font-family: var(--font); font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.why-card p { font-size: .85rem; color: var(--gray); line-height: 1.6; }

/* ---- CTA ---- */
.cta-sec { padding: 60px 0; background: var(--teal); }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-left h2 { font-family: var(--font); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--white); margin-bottom: 8px; }
.cta-left p { color: rgba(255,255,255,.8); }
.cta-right { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-tg {
  background: #229ED9; color: var(--white);
  padding: 14px 28px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; font-family: var(--font);
  transition: background .2s;
}
.btn-tg:hover { background: #1a8bbf; }
.cta-sec .btn-main { background: var(--white); color: var(--teal); box-shadow: none; }
.cta-sec .btn-main:hover { background: var(--gray-lt); }

/* ---- CONTACT ---- */
.contact { padding: 90px 0; background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.ci-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--gray-lt); border-radius: 12px; padding: 18px;
  border: 1px solid var(--border);
}
.ci-icon { font-size: 1.5rem; width: 44px; height: 44px; background: var(--teal-bg); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ci-item strong { display: block; font-size: .75rem; color: var(--gray); margin-bottom: 4px; font-family: var(--font); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ci-item a, .ci-item span { font-weight: 600; color: var(--dark); font-size: .95rem; }
.ci-item a:hover { color: var(--teal); }

/* ---- FORM ---- */
.contact-form, .modal form {
  background: var(--white); border-radius: 16px;
  padding: 36px; border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
.fg { margin-bottom: 18px; }
.fg label { display: block; font-size: .8rem; font-weight: 700; color: var(--dark); margin-bottom: 7px; font-family: var(--font); text-transform: uppercase; letter-spacing: .04em; }
.fg input, .fg select, .fg textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: .92rem; color: var(--dark);
  background: var(--white); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,159,164,0.12);
}
.fg textarea { resize: vertical; min-height: 100px; }
.btn-submit {
  width: 100%; background: var(--teal); color: var(--white);
  border: none; padding: 14px; border-radius: 10px;
  font-size: .95rem; font-weight: 700; cursor: pointer; font-family: var(--font);
  transition: background .2s, transform .2s;
}
.btn-submit:hover { background: var(--teal-dk); transform: translateY(-1px); }
.fn { font-size: .75rem; color: var(--gray); text-align: center; margin-top: 10px; }
.f-success {
  display: none; margin-top: 16px;
  background: #e6f7f8; border: 1px solid var(--teal);
  color: var(--teal-dk); padding: 14px; border-radius: 10px;
  font-weight: 600; text-align: center;
}
.f-success.visible { display: block; }

/* ---- CATALOG HERO ---- */
.cat-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  padding: 60px 24px;
  text-align: center;
}
.cat-hero h1 { font-family: var(--font); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; color: var(--white); margin-bottom: 12px; }
.cat-hero p { color: rgba(255,255,255,.65); font-size: 1rem; }

/* ---- CATALOG SECTION ---- */
.catalog-sec { padding: 60px 0; background: var(--gray-lt); }
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.ftab {
  padding: 9px 22px; border-radius: 100px;
  border: 1.5px solid var(--border); background: var(--white);
  font-family: var(--font); font-size: .82rem; font-weight: 600;
  color: var(--gray); cursor: pointer;
  transition: all .2s;
}
.ftab:hover { border-color: var(--teal); color: var(--teal); }
.ftab.active { background: var(--teal); color: var(--white); border-color: var(--teal); }
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.prod-card {
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid var(--border); overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.prod-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.prod-img {
  height: 180px; display: flex; align-items: center; justify-content: center;
  font-size: 4rem; position: relative;
}
.pi-1,.pi-2,.pi-3 { background: linear-gradient(135deg, #e8f4fd, #c8e6ff); }
.pi-4,.pi-5,.pi-6 { background: linear-gradient(135deg, #e6f7f8, #b2eaec); }
.pi-7,.pi-8 { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.pi-9,.pi-10 { background: linear-gradient(135deg, #f3e5f5, #e1bee7); }
.prod-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--teal); color: var(--white);
  font-size: .68rem; font-weight: 700; padding: 4px 10px; border-radius: 100px;
  font-family: var(--font);
}
.prod-body { padding: 20px; }
.prod-cat { font-size: .72rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; font-family: var(--font); }
.prod-body h3 { font-family: var(--font); font-size: .98rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.prod-body p { font-size: .82rem; color: var(--gray); margin-bottom: 16px; line-height: 1.5; }
.prod-footer { display: flex; align-items: center; justify-content: space-between; }
.prod-price { font-family: var(--font); font-size: .85rem; font-weight: 700; color: var(--teal); }
.btn-order {
  background: var(--teal); color: var(--white);
  padding: 9px 18px; border-radius: 8px; border: none;
  font-size: .82rem; font-weight: 700; cursor: pointer; font-family: var(--font);
  transition: background .2s;
}
.btn-order:hover { background: var(--teal-dk); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 20px;
  padding: 40px; max-width: 480px; width: 100%;
  position: relative; box-shadow: var(--shadow-lg);
}
.modal h3 { font-family: var(--font); font-size: 1.4rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.modal-prod { font-size: .9rem; color: var(--teal); font-weight: 600; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--gray-lt); border: none; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--gray);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); }
.modal form { padding: 0; border: none; box-shadow: none; }

/* ---- FOOTER ---- */
.footer { background: var(--dark); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
.fb p { color: rgba(255,255,255,.5); font-size: .85rem; margin-top: 12px; line-height: 1.6; }
.fsocials { display: flex; gap: 10px; margin-top: 16px; }
.fsocials a { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); padding: 8px 16px; border-radius: 8px; font-size: .8rem; font-weight: 600; transition: background .2s; font-family: var(--font); }
.fsocials a:hover { background: var(--teal); color: var(--white); }
.fl { display: flex; flex-direction: column; gap: 10px; }
.fl h5 { color: var(--white); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; font-family: var(--font); }
.fl a, .fl span { color: rgba(255,255,255,.5); font-size: .85rem; transition: color .2s; }
.fl a:hover { color: var(--teal-lt); }
.footer-bottom { padding: 20px 0; text-align: center; }
.footer-bottom p { color: rgba(255,255,255,.3); font-size: .78rem; }

/* ---- CHAT WIDGET ---- */
.chat-widget { position: fixed; bottom: 28px; right: 28px; z-index: 999; }
.chat-toggle {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--teal); border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,159,164,0.4);
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: transform .2s, background .2s;
}
.chat-toggle:hover { transform: scale(1.08); background: var(--teal-dk); }
.ct-icon { font-size: 1.6rem; }
.ct-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: white;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
}
.chat-box {
  position: absolute; bottom: 74px; right: 0;
  width: 340px; background: var(--white); border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-box.open { display: flex; }
.chat-head {
  background: var(--teal); padding: 16px 20px;
  display: flex; align-items: center; gap: 12px; color: var(--white);
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; font-family: var(--font);
}
.chat-head strong { font-family: var(--font); font-size: .9rem; display: block; }
.online-dot { font-size: .72rem; opacity: .8; }
.chat-close { margin-left: auto; background: none; border: none; color: white; font-size: 1rem; cursor: pointer; opacity: .8; }
.chat-close:hover { opacity: 1; }
.chat-messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; max-height: 280px; overflow-y: auto; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 14px;
  font-size: .85rem; line-height: 1.5;
}
.msg.bot .msg-bubble { background: var(--gray-lt); color: var(--dark); border-bottom-left-radius: 4px; }
.msg.user .msg-bubble { background: var(--teal); color: var(--white); border-bottom-right-radius: 4px; }
.chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-input-row input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: .88rem; outline: none; font-family: var(--font-body);
  transition: border-color .2s;
}
.chat-input-row input:focus { border-color: var(--teal); }
#chatSend {
  background: var(--teal); color: white; border: none;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  font-size: 1.1rem; transition: background .2s;
}
#chatSend:hover { background: var(--teal-dk); }

/* ---- RESPONSIVE ---- */
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .prod-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links, .nav-phone { display: none; }
  .burger { display: flex; margin-left: auto; }
  .cat-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .cta-box { flex-direction: column; text-align: center; }
  .chat-box { width: 300px; right: -8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .topbar { gap: 16px; justify-content: flex-start; font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
