:root {
  --bg: #ddd2bc;
  --stroke: #bcaa94;
  --window: #7f888d;
  --window-shadow: #585a55;
  --accent-light: #d0fee8;
  --accent: #10d291;
  --accent-shadow: #14a074;
  --blue: #17b2b5;
  --blue-shadow: #1897b5;
  --black: #111111;
  --white: #f4f4f4;
  --red: #d9534f;
  --red-shadow: #ff0800;
}

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

body {
  background-image: url('img/bg.png');
  background-repeat: repeat;
  color: var(--black);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

/* ===== BRUTALISM GLOBAL ===== */
.brutal-box {
  border: 4px solid var(--stroke);
  box-shadow: 10px 10px 0px var(--stroke);
  border-radius: 8px;
}

.brutal-box-a {
  border: 4px solid var(--accent);
  box-shadow: 10px 10px 0px var(--accent-shadow);
  border-radius: 8px;
}

.brutal-box-w {
  border: 4px solid var(--window);
  box-shadow: 10px 10px 0px var(--window-shadow);
  border-radius: 8px;
}

.accent-box {
  background: var(--accent);
  border: 4px solid var(--accent-shadow);
  box-shadow: 8px 8px 0px var(--black);
}

.window-box {
  background: var(--window);
  border: 4px solid var(--window-shadow);
  box-shadow: 8px 8px 0px var(--window-shadow);
}

/* ===== CONTAINER ===== */
.container {
  width: 90%;
  max-width: 1400px;
  margin: auto;
}

/* ===== HEADER & NAVBAR ===== */
header {
  padding: 28px 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  padding: 18px 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo img {
  width: 54px;
  height: 54px;
  image-rendering: pixelated;
}

.logo h1 {
  font-size: 30px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--black);
  font-weight: 700;
  background: var(--accent);
  padding: 10px 18px;
  border: 3px solid var(--accent-shadow);
  transition: .15s;
}

.nav-links a:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0px var(--accent-shadow);
}

.profile-button img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

/* ===== HERO SECTION ===== */
.hero {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text {
  padding: 42px;
  background: var(--bg);
}

.hero-text h2 {
  font-size: 78px;
  line-height: 0.95;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-text p {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 34px;
}

.hero-buttons {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  color: var(--black);
  font-weight: 800;
  font-size: 18px;
  padding: 18px 26px;
  transition: .15s;
}

.btn:hover {
  transform: translate(-4px, -4px);
}

.btn-main {
  background: var(--accent);
  border: 4px solid var(--accent-shadow);
  box-shadow: 7px 7px 0px var(--accent-shadow);
}

.btn-secondary {
  background: var(--window);
  border: 4px solid var(--window-shadow);
  box-shadow: 7px 7px 0px var(--window-shadow);
  color: var(--white);
}

.hero-image {
  position: relative;
  padding: 24px;
  background: var(--window);
}

.hero-image img {
  width: 100%;
  display: block;
  border: 4px solid var(--black);
}

.floating-card {
  position: absolute;
  bottom: -25px;
  left: -25px;
  background: var(--accent);
  padding: 20px;
  width: 240px;
}

.floating-card h3 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 8px;
}

.floating-card p {
  font-size: 15px;
  font-weight: 700;
}

/* ===== FEATURES ===== */
.features {
  margin-top: 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  padding: 28px;
  background: var(--bg);
}

.feature h3 {
  font-size: 32px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.feature p {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

/* ===== PRODUCT SECTION ===== */
.product-section {
  margin-top: 120px;
  margin-bottom: 120px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.product-card {
  background: var(--accent);
  padding: 24px;
  transform: rotate(-2deg);
}

.product-card img {
  width: 100%;
  border: 4px solid var(--accent-shadow);
}

.product-info {
  padding: 42px;
  background: var(--bg);
}

.product-info h2 {
  font-size: 58px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.product-info ul {
  list-style: none;
  margin: 30px 0;
}

.product-info li {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  padding-left: 18px;
  position: relative;
}

.product-info li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border: 2px solid var(--accent-shadow);
}

/* ===== FOOTER ===== */
footer {
  padding: 40px 0 80px;
}

.footer-box {
  padding: 30px;
  background: var(--window);
  color: var(--white);
  text-align: center;
}

.footer-box h3 {
  font-size: 42px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.footer-box p {
  font-size: 18px;
  font-weight: 600;
}

/* ===== PROFILE PAGE ===== */
.profile-card {
  width: 500px;
  background: var(--window);
  border: 3px solid var(--window-shadow);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 20px var(--window-shadow);
  margin: 80px auto 0;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  object-fit: cover;
}

.profile-card h1,
.profile-card p {
  color: var(--black);
}

.buttons button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 3px solid var(--accent-shadow);
  border-radius: 10px;
  background: var(--accent);
  color: var(--black);
  cursor: pointer;
  transition: background 0.2s;
}

.buttons button:hover {
  background: var(--accent-shadow);
}

/* ===== LOGIN & REGISTER PAGES (AUTH) ===== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 40px 20px;
}

.auth-card {
  width: 420px;
  max-width: 100%;
  background: var(--bg);
  border: 3px solid var(--stroke);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 10px 25px var(--window-shadow);
}

.auth-card h1 {
  text-align: center;
  color: var(--black);
  line-height: 0;
  margin-bottom: 45px;
}

.auth-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  margin-bottom: 15px;
  border: 3px solid var(--window);
  border-radius: 10px;
  background: var(--window-shadow);
  color: var(--white);
}

.auth-card input::placeholder {
  color: var(--white);
  opacity: 1;
}

.auth-card button {
  width: 100%;
  padding: 14px;
  border: 3px solid var(--accent-shadow);
  border-radius: 10px;
  background: var(--accent);
  color: var(--black);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-card button:hover {
  background: var(--accent-shadow);
}

.auth-card p {
  color: var(--black);
  text-align: center;
  line-height: 1.2;
  font-size: 20px;
  margin: 15px 0 5px;
}

.auth-card a {
  color: var(--accent);
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
}

/* ===== ADMIN PANEL ===== */
.admin {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--window);
  border-right: 4px solid var(--stroke);
  padding: 20px;
}

.sidebar h2 {
  color: var(--white);
  text-align: center;
  margin-bottom: 20px;
}

.sidebar button {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar button:hover {
  background: var(--accent-shadow);
}

.content {
  flex: 1;
  padding: 30px;
}

.content input,
.content textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 2px solid var(--stroke);
  border-radius: 10px;
  background: var(--white);
}

.content textarea {
  min-height: 150px;
  resize: vertical;
}

.content button {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.content button:hover {
  background: var(--accent-shadow);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .hero,
  .product-section,
  .features {
    grid-template-columns: 1fr;
  }

  .hero-text h2 {
    font-size: 54px;
  }

  .product-info h2 {
    font-size: 42px;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-text {
    padding: 24px;
  }

  .hero-text h2 {
    font-size: 42px;
  }

  .hero-text p {
    font-size: 18px;
  }

  .product-info {
    padding: 24px;
  }

  .floating-card {
    position: relative;
    width: 100%;
    left: 0;
    bottom: 0;
    margin-top: 20px;
  }

  .profile-card {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-card {
    width: 90%;
    padding: 20px;
  }

  .admin {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 4px solid var(--stroke);
  }
}

.catalog-page{

    padding-top:140px;
    padding-bottom:60px;
}

.catalog-header{
    background-color: var(--bg);
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top: -100px;
    padding:20px;
    margin-bottom:30px;
}

.catalog-header h1{

    margin:0;
}

.catalog-header input{

    width:320px;

    padding:12px;

    border:none;

    border-radius:12px;

    font-family:inherit;
}

.products-grid {
  column-count: 3;
  column-gap: 25px;
}

.product-card {
  break-inside: avoid;
  margin-bottom: 25px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.product-card img{

    width:100%;
    height:250px;

    object-fit:cover;

    border-radius:16px;

    margin-bottom:15px;
}

.product-card h2{
    font-size:20px;
    margin:5px 0;
}

.product-card h4{
    font-size:16px;
    margin:5px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal; 
}

.product-price{

    font-size:22px;
    font-weight:800;

    color:var(--black);
}

.product-card button{

    width:100%;

    margin-top:10px;

    padding:12px;

    border:2px solid var(--accent-shadow);

    border-radius:12px;

    background:var(--accent);

    color:var(--black);

    cursor:pointer;

    font-weight:700;
}

.product-card button:hover{
    opacity:0.9;
}

#productsList{
    display:grid;
    grid-template-columns:
        repeat(auto-fill,minmax(280px,1fr));
    gap:25px;
    margin-top:30px;
}

.delete-button{
    width:100%;
    margin-top:15px;
    padding:12px;
    border:none;
    border-radius:12px;
    background:var(--red);
    color:var(--white);
    font-weight:700;
    cursor:pointer;
    transition:0.2s;
}

.delete-button:hover{
    background:var(--red-shadow);
}

.admin-user{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:15px;
    background-color: var(--bg);
    padding:20px;
}

.user-actions{
    display:flex;
    gap:10px;
}

.user-actions button{
    padding:10px 15px;
    border:none;
    border-radius:10px;
    cursor:pointer;
}

.danger-button{
    background:var(--red);
    color:var(--white);
}

/* ==========================
   Корзина
========================== */

.cart-container{
    max-width: 1200px;
    margin: 140px auto 50px auto;
    padding: 0 20px;
}

.cart-title{
    margin-bottom: 30px;
}

.cart-list{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item{
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background-color: var(--bg);
}

.cart-item img{
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid var(--accent);
}

.cart-info{
    flex: 1;
}

.cart-info h3{
    margin-bottom: 10px;
}

.cart-price{
    font-size: 20px;
    font-weight: bold;
    color: var(--accent);
}

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

.quantity-controls button{
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: var(--white);
    font-size: 22px;
    cursor: pointer;
    transition: 0.2s;
}

.quantity-controls button:hover{
    opacity: 0.9;
}

.quantity-controls span{
    min-width: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.remove-btn{
    background: var(--red);
    color: var(--white);
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.remove-btn:hover{
    background: var(--red-shadow);
}

.cart-summary{
    margin-top: 40px;
    padding: 30px;
    background-color: var(--bg);
}

.cart-total{
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

.checkout-btn{
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 15px;
    background: var(--accent);
    color: var(--white);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.checkout-btn:hover{
    opacity: 0.9;
}

.empty-cart{
    text-align: center;
    font-size: 22px;
    padding: 60px;
}

/* Адаптация под телефоны */

@media (max-width: 768px){

    .cart-item{
        flex-direction: column;
        text-align: center;
    }

    .quantity-controls{
        justify-content: center;
    }

    .remove-btn{
        width: 100%;
    }
}
/*======================================================
                    CHECKOUT
======================================================*/

.checkout-container{
    max-width:1400px;
    margin:40px auto;
    padding:0 20px;

    display:grid;
    grid-template-columns:2fr 1fr;
    gap:30px;

    align-items:start;
}

.checkout-form,
.checkout-summary{

    background:var(--window);
    border:4px solid var(--window-shadow);
    border-radius:18px;

    padding:28px;

    box-shadow:8px 8px 0 var(--window-shadow);
}

.checkout-form h1{

    margin:0 0 25px;

    color:var(--white);
}

.checkout-form h2{

    margin:35px 0 15px;

    color:var(--white);
}

.checkout-steps{

    display:flex;

    justify-content:space-between;

    gap:12px;

    margin-bottom:35px;
}

.step{

    flex:1;

    padding:12px;

    border-radius:12px;

    background:var(--window-shadow);

    color:white;

    text-align:center;

    font-weight:bold;

    transition:.25s;
}

.step.active{

    background:var(--accent);
}

.step.current{

    background:var(--accent-shadow);

    transform:scale(1.04);
}

.grid-2{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:18px;
}

.input-group{

    display:flex;

    flex-direction:column;

    margin-bottom:18px;
}

.input-group label{

    margin-bottom:8px;

    color:var(--white);

    font-weight:bold;
}

.input-group input,
.input-group textarea,
.input-group select{

    background:var(--bg);

    border:3px solid var(--stroke);

    border-radius:12px;

    padding:12px;

    font-size:16px;

    transition:.2s;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus{

    outline:none;

    border-color:var(--accent);

    box-shadow:0 0 10px var(--accent-shadow);
}

.payment-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:20px;

    margin-top:20px;
}

.payment-option{

    display:block;

    cursor:pointer;
}

.payment-option input{

    display:none;
}

.payment-option>div{

    background:var(--bg);

    border:3px solid var(--stroke);

    border-radius:16px;

    padding:20px;

    min-height:110px;

    transition:.25s;
}

.payment-option h3{

    margin:0 0 8px;
}

.payment-option p{

    margin:0;

    color:var(--window-shadow);
}

.payment-option:hover>div{

    transform:translateY(-3px);

    border-color:var(--accent);
}

.payment-option input:checked+div{

    border-color:var(--accent);

    background:var(--accent-light);

    box-shadow:0 0 18px var(--accent-shadow);
}

.checkout-summary{

    position:sticky;

    top:120px;
}

.checkout-summary h2{

    margin-top:0;

    color:var(--white);
}

.checkout-item{

    display:flex;

    gap:15px;

    margin-bottom:18px;

    padding:12px;

    background:var(--bg);

    border-radius:14px;

    border:2px solid var(--stroke);
}

.checkout-item img{

    width:90px;

    height:90px;

    object-fit:cover;

    border-radius:12px;
}

.checkout-item h4{

    margin:0 0 8px;
}

.checkout-item p{

    margin:0;

    color:var(--window-shadow);
}

.summary-line{

    display:flex;

    justify-content:space-between;

    margin:15px 0;

    color:var(--white);

    font-size:18px;
}

.summary-line.total{

    font-size:24px;

    font-weight:bold;

    color:var(--accent);
}

.checkout-btn{

    width:100%;

    margin-top:30px;

    padding:18px;

    border:none;

    border-radius:14px;

    background:var(--accent);

    color:var(--white);

    font-size:20px;

    font-weight:bold;

    cursor:pointer;

    transition:.25s;
}

.checkout-btn:hover{

    background:var(--accent-shadow);

    transform:translateY(-2px);

    box-shadow:0 8px 20px var(--black);
}

.checkout-btn:active{

    transform:scale(.98);
}

@media(max-width:1000px){

.checkout-container{

grid-template-columns:1fr;

}

.checkout-summary{

position:static;

}

.payment-grid{

grid-template-columns:1fr;

}

.grid-2{

grid-template-columns:1fr;

}

}

/* ---------- ПОСТЫ ---------- */

.adminPost{

    margin-top:20px;
    background-color: var(--bg);
    padding:20px;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.adminPost h2{

    margin-bottom:10px;

}

.adminPostGallery{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:10px;

    margin:15px 0;

}

.adminPostImage{

    width:100%;

    height:220px;

    object-fit:cover;

    border-radius:12px;

    border:2px solid var(--stroke);

}

.adminPost button{

    width:100%;

}
/*==========================
        НОВОСТИ
==========================*/

.postsPage{

    max-width:1200px;

    margin:auto;

    padding:40px;

}

.postsPage h1{

    margin-bottom:5px;

    text-align:center;

}

.postCard{

    background: var(--bg);
    border: 2px solid var(--stroke);
    border-radius: 20px;

    padding: 24px;

    margin-bottom: 30px;

    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: anywhere;

}

.postHeader{

    display:flex;
    justify-content:space-between;
    align-items:flex-start;

    margin-bottom:-40px;

    gap:20px;

}

.postHeader h2{

    margin:0;

    line-height:1.2;

}

.postHeader span{

    opacity:.7;

}

.postText{

    margin:0 0 18px 0;

    line-height:1.7;

    white-space:pre-wrap;

    word-break:break-word;

    overflow-wrap:anywhere;
    margin-bottom:-40px;
}

.postGallery{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));

    gap:4px;

}

.postImage{

    width:100%;

    height:260px;

    object-fit:cover;

    border-radius:15px;

    cursor:pointer;

    transition:.25s;

}

.postImage:hover{

    transform:scale(1.03);

}

.imageViewer{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.85);

    justify-content:center;

    align-items:center;

    z-index:99999;

}

.imageViewer img{

    max-width:90%;

    max-height:90%;

    border-radius:20px;

}

.imageViewer span{

    position:absolute;

    top:30px;

    right:45px;

    font-size:40px;

    color:white;

    cursor:pointer;

}
/*=========================
        МОБИЛЬНОЕ МЕНЮ
=========================*/

.burger{

    display:none;

    font-size:30px;

    cursor:pointer;

    background:none;

    border:none;

    color:var(--accent);

}

.mobileOverlay{

    display:none;

}

/*=========================
        Телефон
=========================*/

@media (max-width:900px){

.navbar{

    position:relative;

}

.burger{

    display:block;

}

.nav-links{

    position:fixed;

    top:0;

    left:-300px;

    width:260px;

    height:100vh;

    background:var(--window);

    display:flex;

    flex-direction:column;

    align-items:flex-start;

    padding:90px 30px;

    gap:25px;

    transition:.35s;

    z-index:1001;

    border-right:2px solid var(--border);

    box-shadow:10px 0 30px rgba(0,0,0,.2);

}

.nav-links.open{

    left:0;

}

.mobileOverlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    display:none;

    z-index:1000;

}

.mobileOverlay.show{

    display:block;

}

.nav-links a{

    width:100%;

    font-size:20px;

    padding:10px 0;

}

}