:root{
  --brand: #142f63;
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line: rgba(15, 23, 42, 0.12);
  --card:#ffffff;
  --soft:#f8fafc;
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.08);
  --radius: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: #fbfbfd;
}

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

.container{
  width:min(1120px, calc(100% - 32px));
  margin:0 auto;
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width: 60px;
  height:60px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #ff8a3d);
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:url(logo.png) no-repeat;
  background-color: transparent;
  background-size: cover;
}

.logo svg{
  width:26px;
  height:26px;
  color:#111;
  opacity: .95;
  display:none;
}

.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brand-text strong{ font-size: 1.02rem; letter-spacing:.2px; }
.brand-text span{ font-size:.86rem; color:var(--muted); }

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

.nav-link{
  padding:10px 12px;
  border-radius: 12px;
  color: var(--muted);
  border:1px solid transparent;
  transition: .2s ease;
  font-weight: 650;
  font-size: .95rem;
}
.nav-link:hover{
  color: var(--text);
  border-color: var(--line);
  background: rgba(15,23,42,.03);
}
.nav-link.active{
  color: var(--text);
  border-color: rgba(209,91,12,.35);
  background: rgba(209,91,12,.08);
}

body.modal-open{
  overflow: hidden;
}

.modal-img{
  width: 100%;
  height: auto;
  display: block;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
}

.menu-toggle{
  display:none;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-weight: 750;
  cursor:pointer;
}

/* Page */
.page{
  padding: 22px 0 40px 0;
}

/* Category */
.category{
  margin: 6px 0 18px 0;
}
.category h1{
  margin:0 0 8px 0;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  letter-spacing: -0.3px;
}
.category p{
  margin:0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
}

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 18px;
  align-items:start;
}

.panel{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.panel-head{
  padding: 18px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background: linear-gradient(180deg, rgba(248,250,252,.9), rgba(255,255,255,1));
}

.panel-head h2{
  margin:0;
  font-size: 1.05rem;
}
.panel-head p{
  margin:6px 0 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.panel-body{
  padding: 18px;
}

/* Items grid */
.items{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.item{
  border:1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
  background: #fff;
  display:flex;
  flex-direction:column;
  min-height: 100%;
}

.item-media{
  aspect-ratio: 16/10;
  background: var(--soft);
  border-bottom:1px solid var(--line);
}
.item-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.item-content{
  padding: 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1;
}

.item-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.item-top h3{
  margin:0;
  font-size: 1rem;
  line-height:1.3;
}

.price{
  flex:0 0 auto;
  white-space:nowrap;
  font-weight: 800;
  font-size: .9rem;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(209,91,12,.35);
  background: rgba(209,91,12,.08);
  color: #7a2b00;
}

.item-content p{
  margin:0;
  color: var(--muted);
  font-size: .92rem;
  line-height:1.45;
}

.item-bottom{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top: 6px;
}

.qty{
  display:flex;
  align-items:center;
  gap: 8px;
}

.qty-btn{
  width:38px;
  height:38px;
  border-radius: 12px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  cursor:pointer;
  transition: .15s ease;
}
.qty-btn:hover{
  background: #0f41a1;
}

.qty-input{
  width:55px;
  height:38px;
  border-radius: 12px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  padding: 0 10px;
  outline:none;
}
.qty-input:focus{
  border-color: rgba(209,91,12,.55);
  box-shadow: 0 0 0 4px rgba(209,91,12,.14);
}

.line-total{
  color: var(--muted);
  font-size: .9rem;
}
.line-total strong{
  color: var(--text);
  font-weight: 900;
}

/* Summary */
.summary{
  position: sticky;
  top: 88px;
}

.summary-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  margin-bottom: 10px;
}
.summary-row span{ color: var(--muted); font-size: .92rem; }
.summary-row strong{ font-size: 1.05rem; }

.total-row{
  border-color: rgba(209,91,12,.35);
  background: rgba(209,91,12,.06);
}

/* Fields */
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top: 10px;
}

label{
  font-weight: 700;
  font-size: .9rem;
}

input[type="text"], input[type="email"], textarea, input[type="password"]{
  width:100%;
  border-radius: 14px;
  border:1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 12px 12px;
  outline:none;
  font-size: .95rem;
}
textarea{
  min-height: 92px;
  resize: vertical;
}
input:focus, textarea:focus{
  border-color: rgba(209,91,12,.55);
  box-shadow: 0 0 0 4px rgba(209,91,12,.14);
}

.btn{
  width:100%;
  border:none;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 14px;
  font-weight: 900;
  letter-spacing: .2px;
  cursor:pointer;
  background: linear-gradient(135deg, var(--brand), #314f88);
  color: #fff;
  box-shadow: 0 14px 28px rgb(12 71 209 / 18%);
  transition: transform .06s ease;
  display: block;
  text-align: center;
}
.btn:active{ transform: translateY(1px); }
.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  filter:saturate(.7);
}

.msg{
  padding: 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
  margin-top: 12px;
  display:none;
}
.msg.success{
  display:block;
  border-color: rgba(46, 204, 113, .35);
  background: rgba(46, 204, 113, .10);
  color: #0f5132;
}
.msg.error{
  display:block;
  border-color: rgba(231, 76, 60, .35);
  background: rgba(231, 76, 60, .10);
  color: #7a1c14;
}
.msg.info{
  display:block;
  border-color: rgba(209,91,12,.35);
  background: rgba(209,91,12,.08);
  color: #7a2b00;
}

.helper{
  margin: 10px 0 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}
.helper code{
  background: rgba(15,23,42,.05);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 10px;
  padding: 2px 8px;
}

/* Footer */
.site-footer{
  border-top:1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  font-size: .92rem;
  background: #fff;
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.footer-inner strong{ color: var(--text); }

/* Responsive */
@media (max-width: 920px){
  .layout{ grid-template-columns: 1fr; }
  .summary{ position: static; }
  .items{grid-template-columns: 1fr;gap: 40px;}
}

@media (max-width: 720px){
  .nav{ display:none; }
  .nav.open{
    display:flex;
    flex-direction:column;
    position:absolute;
    left:0;
    right:0;
    top:72px;
    padding: 12px 16px 16px 16px;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--line);
  }
  .menu-toggle{ display:inline-flex; align-items:center; gap:8px; }
  .header-inner{ position:relative; }
}



/* Categories */
.categories-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.category-card{
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow:hidden;
  background:#fff;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.category-card:hover{
  transform: translateY(-2px);
  border-color: rgba(209,91,12,.35);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.12);
}

.category-media{
  aspect-ratio: 16/10;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.category-media img{
  width:100%;
  height:100%;
  object-fit: cover;
}

.category-card-body{
  padding: 14px;
}

.category-card-body h3{
  margin:0;
  font-size: 1rem;
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 920px){
  .categories-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .categories-grid{ grid-template-columns: 1fr; }
}


/* Auth (Login/Register/Forgot) */
.auth-wrap{
  display:flex;
  justify-content:center;
  padding: 6px 0 10px 0;
}

.auth-card{
  width: min(520px, 100%);
}

.auth-form{
  display:flex;
  flex-direction:column;
}

.input-row{
  display:flex;
  gap: 10px;
  align-items:stretch;
}

.input-row input{
  flex: 1;
}

.btn-ghost{
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  padding: 0 14px;
  cursor:pointer;
  transition: .15s ease;
  white-space: nowrap;
  padding:12px;
}

.btn-ghost:hover{
  border-color: rgba(209,91,12,.45);
  background: rgba(209,91,12,.06);
}

.auth-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-top: 10px;
}
select,input{padding:12px;border-radius:14px;border:1px solid var(--line)}
.check{
  display:flex;
  align-items:center;
  gap: 10px;
  user-select:none;
  color: var(--muted);
  font-size: .92rem;
}

.check input{
  width: 18px;
  height: 18px;
}

.link{
  color: #7a2b00;
  font-weight: 800;
  text-decoration: none;
}

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

.auth-helper{
  margin-top: 12px;
  text-align:center;
}
td{padding:15px !important; border:1px solid #ccc}

.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-dropdown {
    position: relative;
}

.lang-dropdown summary {
    list-style: none;
}

.lang-dropdown summary::-webkit-details-marker {
    display: none;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #f7f7f7;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lang-toggle:hover {
    background: #f4f4f4;
}

.lang-toggle:focus,
.lang-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

.lang-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lang-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.lang-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
}

.lang-arrow {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.lang-arrow svg {
    width: 14px;
    height: 14px;
    display: block;
}

.lang-dropdown[open] .lang-arrow {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 120px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background: #19315f;
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 999;
    display: grid;
    gap: 4px;
}

.lang-menu .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-menu .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    transform: translateX(2px);
}

.lang-menu .nav-link.active {
    background: rgba(255,255,255,0.12);
    font-weight: 700;
}

.lang-menu .nav-link.active::after {
    content: "✓";
    font-size: 13px;
    opacity: 0.9;
}