@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{
    --bg:#ffffff;
    --text:#0b0b0f;
    --muted:rgba(0,0,0,0.6);
    --card:#f5f5f7;
    --border:rgba(0,0,0,0.08);
    --accent:#0071e3;
}

/* =========================
   LAYOUT FIX (FOOTER - FINAL FIX)
========================= */

html, body {
    height: 100%;
}

body{
    font-family:'Inter',sans-serif;
    background:var(--bg);
    color:var(--text);
    line-height:1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    padding-top: 80px;

    display:flex;
    flex-direction:column;
    min-height:100vh;
}

/* важно: ВСЕГДА растягиваем контент */
main{
    flex:1 0 auto;
}

/* =========================
   CONTAINER
========================= */

.container{
    width:100%;
    max-width:1100px;
    margin:0 auto;
    padding:0 20px;
}

/* =========================
   HEADER (APPLE STYLE)
========================= */

header{
    position:fixed;
    top:0;
    width:100%;
    z-index:1000;

    background:rgba(255,255,255,0.65);
    backdrop-filter:blur(20px);

    border-bottom:1px solid var(--border);
}

.nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 0;
}

.logo{
    font-size:20px;
    font-weight:700;
    letter-spacing:-0.5px;
}

.logo span{
    color:var(--accent);
}

nav{
    display:flex;
    gap:22px;
}

nav a{
    color:var(--text);
    text-decoration:none;
    font-weight:500;
    opacity:0.7;
    transition:0.2s ease;
}

nav a:hover{
    opacity:1;
    color:var(--accent);
}

/* =========================
   HERO
========================= */

.hero{
    padding:100px 0 60px;
}

.hero-wrapper{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:60px;
    align-items:center;
}

.hero-text h2{
    font-size:52px;
    font-weight:700;
    line-height:1.05;
    letter-spacing:-1.5px;
    margin-bottom:16px;
}

.hero-text p{
    font-size:18px;
    color:var(--muted);
    margin-bottom:24px;
    max-width:520px;
}

.hero-buttons{
    display:flex;
    gap:14px;
}

/* BUTTONS */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 18px;
    border-radius:999px;
    font-weight:600;
    text-decoration:none;
    transition:0.25s ease;
}

.btn-primary{
    background:var(--accent);
    color:white;
}

.btn-primary:hover{
    transform:translateY(-3px) scale(1.03);
}

.btn-secondary{
    background:var(--card);
    color:var(--text);
}

.btn-secondary:hover{
    background:#eaeaec;
}

/* HERO IMAGE */
.hero-image{
    width:100%;
    height:420px;
    overflow:hidden;
    border-radius:28px;
    box-shadow:0 20px 60px rgba(0,0,0,0.12);
}

.hero-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* =========================
   SECTIONS
========================= */

.products{
    padding:70px 0;
}

.section-title{
    font-size:36px;
    font-weight:700;
    margin-bottom:20px;
}

/* GRID */
.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:26px;
}

/* CARD */
.card{
    background:white;
    border:1px solid rgba(0,0,0,0.06);
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,0.06);
    transition:0.35s ease;
}

.card:hover{
    transform:translateY(-10px) scale(1.02);
}

.card img{
    width:100%;
    height:240px;
    object-fit:cover;
}

.card-content{
    padding:18px;
}

.card-content h3{
    font-size:18px;
    margin-bottom:8px;
}

.card-content p{
    font-size:14px;
    color:var(--muted);
    margin-bottom:14px;
}

.price-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.price{
    font-weight:700;
    font-size:18px;
}

.buy-btn{
    background:var(--accent);
    color:white;
    padding:10px 14px;
    border-radius:999px;
    text-decoration:none;
    font-weight:600;
}

/* PRODUCT PAGE */
.product-page{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:50px;
    padding:50px 0;
}

.product-image{
    width:100%;
    max-width:500px;
    border-radius:24px;
    object-fit:cover;
}

.product-info h2{
    font-size:40px;
    margin-bottom:20px;
}

.product-description{
    color:var(--muted);
    margin-bottom:24px;
}

.product-price{
    font-size:34px;
    font-weight:700;
}

/* CONTACT */
.contact-box{
    background:linear-gradient(135deg,#f5f5f7,#ffffff);
    border-radius:28px;
    padding:60px 30px;
    text-align:center;
}

/* FOOTER (FIXED BEHAVIOR) */
footer{
    padding:40px 0;
    text-align:center;
    color:var(--muted);
    border-top:1px solid var(--border);
    margin-top:auto;
    flex-shrink:0;
}

/* ANIMATION */
@keyframes fadeUp{
    from{opacity:0; transform:translateY(20px);}
    to{opacity:1; transform:translateY(0);}
}

/* MOBILE */
@media (max-width:768px){

    .hero-wrapper{
        grid-template-columns:1fr;
        text-align:center;
    }

    .hero-text h2{
        font-size:34px;
    }

    .hero-image{
        height:260px;
    }

    .grid{
        grid-template-columns:1fr;
    }

    .product-page{
        grid-template-columns:1fr;
    }

    nav{
        flex-wrap:wrap;
        justify-content:center;
    }
}