@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap");

:root {
    --background: #f6f1e9;
    --surface: #ffffff;
    --surface-dark: #201713;
    --primary: #8c5a38;
    --primary-dark: #5e3825;
    --secondary: #d6aa72;
    --text: #251d19;
    --text-light: #756a63;
    --border: #e7ddd3;
    --danger: #bc4f43;
    --shadow: 0 14px 45px rgba(59, 39, 28, 0.1);
    --radius-large: 28px;
    --radius-medium: 18px;
    --radius-small: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--background);
    color: var(--text);
    font-family: "Vazirmatn", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

button,
input {
    font-family: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

button {
    border: none;
    cursor: pointer;
}

/* Header */

.main-header {
    position: fixed;
    z-index: 900;
    top: 0;
    right: 0;
    left: 0;

    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;

    height: 76px;
    padding: 0 6%;

    background: rgba(25, 18, 15, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.hamburger-button,
.search-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;

    transition: 0.25s;
}

.hamburger-button:hover,
.search-button:hover {
    background: rgba(255, 255, 255, 0.16);
}

.hamburger-button {
    flex-direction: column;
    gap: 5px;
}

.hamburger-button span {
    width: 19px;
    height: 2px;
    background: #ffffff;
    border-radius: 5px;
}

.search-button {
    font-size: 28px;
}

.header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #ffffff;
}

.header-logo,
.footer-logo,
.side-menu-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    color: #ffffff;
    background: var(--primary);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;

    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 700;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
}

.header-brand-text strong {
    font-size: 16px;
    line-height: 1.2;
}

.header-brand-text small {
    margin-top: 3px;
    color: #cbbdb4;
    font-size: 8px;
    letter-spacing: 2px;
}

/* Hero */

.hero-section {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 640px;
    padding: 130px 20px 80px;

    color: #ffffff;
    text-align: center;

    background:
        url("../images/hero-coffee.jpg")
        center / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(18, 12, 10, 0.45),
            rgba(18, 12, 10, 0.8)
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-label {
    display: inline-block;

    margin-bottom: 18px;
    padding: 8px 18px;

    color: #f3d4ae;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;

    font-size: 13px;
}

.hero-content h1 {
    font-size: clamp(38px, 8vw, 72px);
    font-weight: 300;
    line-height: 1.35;
}

.hero-content h1 strong {
    display: block;
    color: #e0b987;
    font-weight: 800;
}

.hero-content p {
    max-width: 550px;
    margin: 22px auto 0;

    color: #e8dfda;
    font-size: 16px;
    line-height: 2;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 150px;
    min-height: 49px;
    margin-top: 30px;
    padding: 10px 25px;

    color: #ffffff;
    background: var(--primary);
    border-radius: 50px;

    font-weight: 600;

    transition: 0.25s;
}

.hero-button:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

/* Menu section */

.menu-section {
    max-width: 1250px;
    margin: auto;
    padding: 85px 6%;
}

.section-heading {
    margin-bottom: 36px;
    text-align: center;
}

.section-heading > span {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.section-heading h2 {
    margin-top: 9px;
    font-size: clamp(27px, 5vw, 42px);
}

.section-heading p {
    margin-top: 10px;
    color: var(--text-light);
    line-height: 1.8;
}

/* Categories */

.category-wrapper {
    position: sticky;
    z-index: 20;
    top: 86px;

    margin-bottom: 30px;
    padding: 8px;

    background: rgba(246, 241, 233, 0.92);
    border-radius: 24px;
    backdrop-filter: blur(15px);
}

.category-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

    max-width: 800px;
    margin: auto;
    padding: 7px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 9px 30px rgba(59, 39, 28, 0.08);
}

.category-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 54px;
    padding: 10px;

    color: var(--text-light);
    background: transparent;
    border-radius: 14px;

    font-size: 14px;
    font-weight: 600;

    transition: 0.25s;
}

.category-tab:hover {
    color: var(--primary);
    background: #f8f1e9;
}

.category-tab.active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 8px 20px rgba(140, 90, 56, 0.25);
}

.category-icon {
    font-size: 20px;
}

/* Search */

.product-search-box {
    display: none;
    align-items: center;
    gap: 10px;

    max-width: 600px;
    height: 55px;
    margin: 0 auto 30px;
    padding: 0 18px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    box-shadow: 0 9px 30px rgba(59, 39, 28, 0.07);
}

.product-search-box.visible {
    display: flex;
}

.product-search-box span {
    color: var(--primary);
    font-size: 25px;
}

.product-search-box input {
    width: 100%;
    border: none;
    outline: none;
    color: var(--text);
    background: transparent;
    font-size: 14px;
}

/* Products */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.product-card {
    overflow: hidden;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    box-shadow: 0 12px 38px rgba(59, 39, 28, 0.07);

    transition: 0.3s;
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-7px);
}

.product-image-wrapper {
    position: relative;
    height: 230px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;

    padding: 7px 12px;

    color: #ffffff;
    background: var(--primary);
    border-radius: 50px;

    font-size: 11px;
    font-weight: 600;
}

.product-content {
    padding: 21px;
}

.product-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.product-title {
    font-size: 18px;
    font-weight: 800;
}

.product-price {
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.product-description {
    min-height: 52px;
    margin-top: 11px;

    color: var(--text-light);
    font-size: 13px;
    line-height: 1.9;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid var(--border);
}

.product-status {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #67805e;
    font-size: 12px;
}

.product-status::before {
    content: "";

    width: 7px;
    height: 7px;

    background: #6f9565;
    border-radius: 50%;
}

.add-product-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 39px;
    height: 39px;

    color: #ffffff;
    background: var(--surface-dark);
    border-radius: 50%;

    font-size: 22px;

    transition: 0.25s;
}

.add-product-button:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.empty-products {
    display: none;
    padding: 65px 20px;
    text-align: center;
}

.empty-products.visible {
    display: block;
}

.empty-products span {
    font-size: 50px;
}

.empty-products h3 {
    margin-top: 15px;
}

.empty-products p {
    margin-top: 8px;
    color: var(--text-light);
}

/* Side menu */

.menu-overlay {
    position: fixed;
    z-index: 998;
    inset: 0;

    visibility: hidden;
    opacity: 0;

    background: rgba(13, 9, 7, 0.62);
    backdrop-filter: blur(5px);

    transition: 0.3s;
}

.menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

.side-menu {
    position: fixed;
    z-index: 999;
    top: 0;
    right: 0;

    display: flex;
    flex-direction: column;

    width: min(370px, 88%);
    height: 100vh;
    padding: 25px;

    background: var(--surface-dark);

    transform: translateX(105%);
    transition: 0.35s ease;
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 22px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

    color: #ffffff;
}

.side-menu-brand div {
    display: flex;
    flex-direction: column;
}

.side-menu-brand span:last-child {
    margin-top: 3px;
    color: #bcaea6;
    font-size: 11px;
}

.close-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;

    font-size: 26px;
}

.side-menu-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 35px;
}

.side-menu-link {
    display: flex;
    align-items: center;
    gap: 13px;

    min-height: 55px;
    padding: 0 16px;

    color: #cfc1b9;
    border-radius: 14px;

    transition: 0.25s;
}

.side-menu-link span {
    width: 24px;
    font-size: 20px;
    text-align: center;
}

.side-menu-link:hover,
.side-menu-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
}

.side-menu-link.active {
    border-right: 3px solid var(--secondary);
}

.side-menu-footer {
    margin-top: auto;
    padding-top: 25px;
    color: #a89991;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu-footer p {
    font-size: 12px;
}

.social-links {
    display: flex;
    gap: 9px;
    margin-top: 14px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;

    font-size: 10px;
}

/* Footer */

.main-footer {
    padding: 55px 6% 25px;
    color: #ffffff;
    background: var(--surface-dark);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    text-align: right;
}

.footer-brand strong {
    font-size: 18px;
}

.footer-brand p {
    margin-top: 4px;
    color: #aa9d95;
    font-size: 12px;
}

.footer-information {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 35px;

    max-width: 850px;
    margin: 38px auto 0;
    padding: 25px 0;

    color: #c6b8b0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-information p {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
}

.footer-information span {
    color: var(--secondary);
}

.footer-bottom {
    margin-top: 24px;
    color: #7e726b;
    font-size: 11px;
    text-align: center;
}

/* Responsive */

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .main-header {
        height: 68px;
        padding: 0 16px;
    }

    .header-brand-text {
        display: none;
    }

    .header-logo {
        width: 40px;
        height: 40px;
    }

    .hero-section {
        min-height: 570px;
        padding-top: 105px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .menu-section {
        padding: 65px 14px;
    }

    .category-wrapper {
        top: 73px;
        margin-right: -5px;
        margin-left: -5px;
    }

    .category-tabs {
        gap: 4px;
        padding: 5px;
    }

    .category-tab {
        flex-direction: column;
        gap: 2px;
        min-height: 61px;
        padding: 5px;
        font-size: 10px;
    }

    .category-icon {
        font-size: 18px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-card {
        display: grid;
        grid-template-columns: 120px 1fr;
        border-radius: 20px;
    }

    .product-image-wrapper {
        height: 100%;
        min-height: 178px;
    }

    .product-content {
        padding: 16px;
    }

    .product-title-row {
        flex-direction: column;
        gap: 5px;
    }

    .product-description {
        min-height: auto;
        margin-top: 7px;
        font-size: 11px;
    }

    .product-footer {
        margin-top: 12px;
        padding-top: 11px;
    }

    .product-badge {
        top: 10px;
        right: 10px;
        padding: 5px 8px;
        font-size: 9px;
    }

    .footer-information {
        align-items: center;
        flex-direction: column;
    }
}