/* ===== LINK RESET (Safari Fix) ===== */

a{
    color:inherit;
    text-decoration:none;
}

a:visited{
    color:inherit;
}

a:hover{
    color:inherit;
}

a:active{
    color:inherit;
}

:root{
    --bg:#f9fafb;
    --card:#ffffff;
    --primary:#f4b8a4;
    --primary-dark:#eaa18a;
    --text:#1f2937;
    --muted:#6b7280;
}

/* ================= BASE ================= */

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

body{
    font-family:'Inter',sans-serif;
    background:linear-gradient(180deg,#f9fafb 0%,#f1f5f9 100%);
    color:var(--text);
    line-height:1.5;
}

.container{
    width:100%;
    max-width:1400px;
    margin:0 auto;
    padding:0 24px;
}

/* ================= HERO ================= */

.hero{
    min-height:100svh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    position:relative;
    overflow:hidden;
}

.hero-bg{
    position:absolute;
    inset:0;
    background:
            linear-gradient(rgba(255,255,255,0.85),rgba(255,255,255,0.9)),
            url('../images/hero.jpg') center/cover no-repeat;
    z-index:-1;
}

.hero h1{
    font-size:clamp(36px,4vw,64px);
    margin-bottom:20px;
}

.hero p{
    font-size:18px;
    color:var(--muted);
    margin-bottom:25px;
}

/* ================= SECTION HEADER ================= */

.section-header{
    text-align:center;
    margin-bottom:60px;
}

.section-header h2{
    font-size:32px;
    margin-bottom:10px;
}

.section-header p{
    color:var(--muted);
}

/* ================= ADVANTAGES ================= */

.advantages{
    padding:100px 0;
}

.adv-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
}

.adv-item{
    background:white;
    padding:35px;
    border-radius:20px;
    text-align:center;
    box-shadow:0 10px 30px rgba(0,0,0,0.05);
    transition:.3s ease;
}

.adv-item:hover{
    transform:translateY(-6px);
    box-shadow:0 20px 50px rgba(0,0,0,0.08);
}

.adv-icon{
    width:60px;
    height:60px;
    margin:0 auto 20px;
    border-radius:50%;
    background:rgba(244,184,164,0.15);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
}

/* ================= PRODUCTS ================= */

.products{
    padding:100px 0;
}

.product-grid{
    align-items:stretch;
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:35px;
}

.card{
    background:var(--card);
    border-radius:20px;
    overflow:hidden;
    position:relative;
    display:flex;
    flex-direction:column;
    box-shadow:0 10px 25px rgba(0,0,0,0.05);
    transition:.3s ease;
}

.card:hover{
    transform:translateY(-8px);
    box-shadow:0 25px 60px rgba(0,0,0,0.08);
}

.badge{
    position:absolute;
    top:15px;
    left:15px;
    background:#ff6b6b;
    color:white;
    font-size:11px;
    padding:6px 10px;
    border-radius:20px;
    z-index:5;
}

.image-wrapper{
    aspect-ratio:4/5;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:white;
}

.image-wrapper img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.card-body{
    padding:20px;
    display:flex;
    flex-direction:column;
    height:100%;
}

.card-btn{
    margin-top:auto;
}

.price{
    margin:12px 0;
    font-weight:600;
}

/* ================= REVIEWS ================= */

.reviews{
    padding:100px 0;
    background:white;
}

.review-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
    margin-top:40px;
}

.review{
    background:var(--bg);
    padding:25px;
    border-radius:16px;
    box-shadow:0 5px 15px rgba(0,0,0,0.03);
}

/* ================= SUBSCRIBE ================= */

.subscribe{
    padding:100px 0;
    text-align:center;
}

.subscribe input{
    padding:12px;
    border-radius:10px;
    border:1px solid #ddd;
    width:260px;
    margin-right:10px;
}

/* ================= FOOTER ================= */

footer{
    background:#111;
    color:white;
    padding:80px 0;
}

.footer-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:30px;
}

footer strong{
    font-size:18px;
}

/* ================= BUTTONS ================= */

button{
    background:var(--primary);
    border:none;
    padding:10px 18px;
    border-radius:25px;
    cursor:pointer;
    transition:.2s ease;
    color:#fff;
    -webkit-appearance:none;
    appearance:none;
}

button:hover{
    background:var(--primary-dark);
}

/* ================= CART BUTTON ================= */

.cart-button{
    position:fixed;
    top:30px;
    right:30px;
    background:#111;
    color:white;
    padding:12px 20px;
    border-radius:40px;
    font-size:14px;
    z-index:1200;
}

.cart-button.disabled{
    background:#aaa;
    cursor:not-allowed;
    opacity:.6;
}

.cart-panel{
    position:fixed;
    top:90px;
    right:30px;
    width:360px;
    max-width:90%;
    max-height:70vh;
    overflow-y:auto;
    padding:25px;
    border-radius:20px;

    /* красивый стиль */
    background:rgba(255,255,255,0.95);
    backdrop-filter:blur(10px);
    box-shadow:0 25px 70px rgba(0,0,0,0.25);

    opacity:0;
    transform:translateY(-15px) scale(.97);
    pointer-events:none;
    transition:.25s ease;
    z-index:1100;
}

.cart-panel.active{
    opacity:1;
    transform:translateY(0) scale(1);
    pointer-events:auto;
}

/* ===== ВНУТРЕННИЕ СТИЛИ КОРЗИНЫ ===== */

.cart-panel h3{
    margin-bottom:15px;
}

.cart-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;
    font-size:14px;
}

.cart-price{
    font-weight:600;
    margin-left:8px;
}

.cart-remove{
    background:#f3f4f6;
    border:none;
    border-radius:8px;
    padding:4px 8px;
    font-size:13px;
    cursor:pointer;
    transition:.2s;
}

.cart-remove:hover{
    background:#e5e7eb;
}

.cart-total{
    margin:15px 0;
    font-weight:600;
}

.cart-panel input{
    width:100%;
    padding:10px;
    border-radius:10px;
    border:1px solid #ddd;
    margin-bottom:10px;
}

.cart-checkout{
    width:100%;
}

/* ================= REVIEW UPGRADE ================= */

.reviews{
    padding:120px 0;
    background:linear-gradient(180deg,#ffffff,#f9fafb);
}

.reviews-summary{
    margin-top:15px;
    font-weight:500;
    color:#111;
}

.review-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:40px;
    margin-top:50px;
}

.review{
    background:white;
    padding:30px;
    border-radius:22px;
    box-shadow:0 15px 40px rgba(0,0,0,0.04);
    transition:.3s ease;
}

.review:hover{
    transform:translateY(-8px);
    box-shadow:0 25px 60px rgba(0,0,0,0.08);
}

.review-header{
    display:flex;
    align-items:center;
    gap:15px;
    margin-bottom:15px;
}

.review-avatar{
    width:50px;
    height:50px;
    border-radius:50%;
    background:linear-gradient(135deg,#f4b8a4,#eaa18a);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:600;
    font-size:18px;
}

.review-name{
    font-weight:600;
    font-size:15px;
}

.review-stars{
    color:#f59e0b;
    font-size:14px;
}

.review p{
    font-size:14px;
    color:#374151;
    line-height:1.6;
}

/* ================= RESPONSIVE ================= */

@media(max-width:768px){

    .hero{
        min-height:70vh;
    }

    .cart-panel{
        right:10px;
        left:10px;
        width:auto;
    }

}

@media(max-width:480px){

    .section-header h2{
        font-size:24px;
    }

    .hero h1{
        font-size:28px;
    }

    .hero p{
        font-size:16px;
    }

    .subscribe input{
        width:100%;
        margin-bottom:10px;
    }

    .subscribe button{
        width:100%;
    }

}