:root {
    --blue-dark: #0b3d91;
    --blue: #1a56c4;
    --blue-light: #2f7de1;
    --accent: #ff7a1a;
    --text: #1c2430;
    --text-light: #5b6472;
    --bg-light: #f5f8fc;
    --white: #ffffff;
    --radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* ==== Animations: fade-in on scroll + hero/CTA motion ==== */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes bounceIn {
    0% { opacity: 0; transform: scale(.8) translateY(20px); }
    60% { opacity: 1; transform: scale(1.03) translateY(-4px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,26,.45); }
    50% { box-shadow: 0 0 0 10px rgba(255,122,26,0); }
}

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

img { max-width: 100%; display: block; }

/* ==== Buttons ==== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(26,86,196,.35); }

.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { box-shadow: 0 8px 20px rgba(255,122,26,.35); }

.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }

/* ==== Navbar ==== */
.navbar {
    position: sticky;
    top: 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    z-index: 100;
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--blue-dark);
    letter-spacing: .5px;
}
.logo span { color: var(--accent); }

/* ==== Hero: slider full-width + overlay + tiêu đề ==== */
.hero {
    position: relative;
    min-height: 560px;
    color: var(--white);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11,61,145,.82), rgba(47,125,225,.72));
    z-index: 1;
}
.hero-inner {
    position: relative;
    z-index: 2;
    padding: 120px 24px 80px;
}
.hero h1 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
    animation: bounceIn .8s ease both;
}
.hero-sub {
    font-size: 18px;
    opacity: .95;
    margin-bottom: 32px;
    text-shadow: 0 1px 8px rgba(0,0,0,.25);
    animation: bounceIn .8s .15s ease both;
}
.hero .btn-accent {
    animation: bounceIn .8s .3s ease both, pulse 2.4s 1.2s infinite;
}

/* ==== Placeholder blocks for missing images ==== */
.placeholder {
    background: repeating-linear-gradient(45deg, #dde5f0, #dde5f0 10px, #e8edf5 10px, #e8edf5 20px);
    border: 2px dashed #a9b8cf;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5b6472;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}
.placeholder::before {
    content: attr(data-placeholder);
    padding: 8px 16px;
    background: rgba(255,255,255,.85);
    border-radius: 8px;
}

/* ==== Section title (dùng chung mọi section) ==== */
.section-title {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    color: var(--blue-dark);
    margin-bottom: 48px;
}
.section-title.left { text-align: left; margin-bottom: 20px; }

/* ==== Why: 6 lý do chọn Cười Cafe ==== */
.why { padding: 80px 0; background: var(--bg-light); }
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.why-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}
.why-card:hover {
    transform: translateY(-8px) rotate(-.5deg);
    box-shadow: 0 16px 32px rgba(11,61,145,.15);
}
.why-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--white);
    font-weight: 800;
    margin-bottom: 16px;
    transition: transform .25s ease;
}
.why-card:hover .why-num {
    transform: rotate(15deg) scale(1.15);
}
.why-card h3 {
    font-size: 17px;
    color: var(--accent);
    margin-bottom: 10px;
}
.why-card p { color: var(--text-light); font-size: 14px; }

/* ==== Pricing: 2 combo trọn gói ==== */
.pricing { padding: 80px 0; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 56px;
}
.price-card {
    border: 1px solid #dde5f0;
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}
.price-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(11,61,145,.12);
}
.price-card.featured {
    border: 2px solid var(--blue);
    box-shadow: 0 10px 30px rgba(26,86,196,.15);
    padding: 44px 36px;
}
.price-card.featured:hover {
    transform: translateY(-6px);
}
.price-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    cursor: zoom-in;
    border: 1px solid #eef1f6;
    transition: transform .2s ease, box-shadow .2s ease;
}
.price-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.price-card h3 { font-size: 20px; color: var(--blue-dark); margin-bottom: 12px; }
.price {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
}
.price span { font-size: 18px; }
.price-desc { color: var(--text-light); margin-bottom: 20px; font-size: 14px; }
.price-features {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
}
.price-features li {
    padding: 8px 0 8px 28px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
    position: relative;
}
.price-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--blue);
    font-weight: 800;
}
.price-fit {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 24px;
}

/* ==== Need-info notes (dùng khi thiếu số liệu, hiện "cần a cung cấp") ==== */
.section-note {
    background: #fff4e5;
    border: 1px solid #ffce8a;
    color: #8a5a00;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin: -20px auto 32px;
    max-width: 780px;
}

/* ==== Compare table: dùng chung cho bảng combo máy + bảng cà phê hạt ==== */
.compare-title {
    text-align: center;
    font-size: 20px;
    color: var(--blue-dark);
    margin: 56px 0 24px;
}
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid #dde5f0;
    margin-bottom: 24px;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 640px;
}
.compare-table th,
.compare-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef1f6;
}
.compare-table th {
    background: var(--blue-dark);
    color: var(--white);
    font-weight: 700;
}
.compare-table tbody tr:nth-child(even) { background: var(--bg-light); }
.need-info {
    color: #c0392b;
    font-weight: 700;
    font-style: italic;
}

/* ==== Beans: bảng giá cà phê hạt ==== */
.beans { padding: 80px 0; background: var(--bg-light); }

/* ==== Pricing/table hint & note text ==== */
.img-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    margin-top: -8px;
    margin-bottom: 48px;
}
.table-note {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

/* ==== Lightbox: modal xem ảnh phóng to ==== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    cursor: zoom-out;
    animation: fadeInBg .2s ease;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    animation: bounceIn .3s ease both;
}
@keyframes fadeInBg { from { opacity: 0; } to { opacity: 1; } }

/* ==== Roastery: xưởng rang + chứng chỉ chất lượng ==== */
.roastery { padding: 80px 0; background: var(--bg-light); }
.roastery-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.roastery-image { height: 320px; border-radius: var(--radius); }
.quote {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 16px;
    font-style: italic;
}
.roastery-content p { margin-bottom: 14px; color: var(--text-light); }

/* ==== Gallery: 12 ảnh xe cà phê thực tế ==== */
.gallery { padding: 80px 0; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.gallery-item {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-item:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 12px 24px rgba(0,0,0,.15);
    z-index: 1;
}

/* ==== Contact: thông tin liên hệ (căn giữa, không còn form) ==== */
.contact {
    padding: 90px 0;
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
    color: var(--white);
    text-align: center;
}
.contact-inner {
    display: flex;
    justify-content: center;
}
.contact-info {
    max-width: 560px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius);
    padding: 48px 40px;
    backdrop-filter: blur(4px);
}
.contact-info .section-title {
    color: var(--white);
    margin-bottom: 8px;
}
.contact-name {
    font-size: 18px;
    font-weight: 700;
    opacity: .9;
    margin-bottom: 24px;
}
.contact-details {
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 28px;
}
.contact-info a { color: var(--white); font-weight: 700; text-decoration: underline; }
.contact-info .btn-accent { animation: pulse 2.4s infinite; }

/* ==== Footer ==== */
.footer {
    padding: 24px 0;
    text-align: center;
    background: #071c40;
    color: rgba(255,255,255,.7);
    font-size: 13px;
}

/* ==== Back-to-top button ==== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    border: none;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(255,122,26,.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(.8);
    transition: opacity .3s ease, transform .3s ease, visibility .3s, background .2s ease;
    z-index: 200;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.back-to-top:hover {
    background: var(--blue);
    transform: translateY(-4px) scale(1.08);
}
.back-to-top:active {
    transform: translateY(0) scale(.95);
}

/* ==== Responsive ==== */
@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .why-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .roastery-inner { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-info { padding: 36px 24px; }
}
