@font-face {
    font-family: 'Noto';
    src: url('fonts/Noto.ttf') format('truetype');
}

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

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Noto', sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 215, 0, 0.18), transparent 30%),
        linear-gradient(180deg, #15151a 0%, #0f0f12 100%);
    color: #fff;
}

body {
    box-shadow: inset 0 0 70px 25px rgba(0, 0, 0, 0.82);
    min-height: 100vh;
    padding-bottom: 100px;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 16px;
    background: rgba(15, 15, 18, 0.45);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.main-header.scrolled {
    background: rgba(15, 15, 18, 0.82);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.header-text h1 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.header-text p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.main-container {
    padding: 18px 16px;
}

.hero {
    margin-bottom: 18px;
}

.hero h2 {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.hero p {
    opacity: 0.85;
    line-height: 1.8;
}

.scrollable-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.product-card {
    display: grid;
    grid-template-rows: 190px auto;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.product-img {
    background-size: cover;
    background-position: center;
    position: relative;
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
}

.product-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 65%);
}

.product-info {
    padding: 14px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.product-info p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 12px;
    line-height: 1.7;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.price {
    font-weight: 700;
    color: #ffd54f;
    font-size: 0.95rem;
}

.add-btn, .checkout-btn, .clear-btn, .close-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.add-btn {
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    color: #111;
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(255, 193, 7, 0.22);
}

.add-btn:active {
    transform: scale(0.98);
}

.cart-icon {
    position: fixed;
    bottom: 18px;
    left: 18px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    color: #111;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
    z-index: 1200;
}

#cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #111;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffd54f;
}

.toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0,0,0,0.86);
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    z-index: 2000;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.hidden {
  display: none !important; /* یا display: none; */
  visibility: hidden !important; /* یا visibility: hidden; */
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1500;
}

.modal-content {
    width: 100%;
    max-width: 520px;
    background: rgba(18, 18, 22, 0.96);
    border-radius: 24px 24px 0 0;
    padding: 16px;
    max-height: 85vh;
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 24px;
}

.cart-items {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    padding: 12px;
    border-radius: 16px;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name {
    font-weight: 700;
}

.cart-item-price {
    color: #ffd54f;
    font-size: 0.9rem;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 18px;
}

.cart-summary {
    display: grid;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.cart-summary div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-btn {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: #fff;
    padding: 12px;
    border-radius: 14px;
    font-weight: 700;
}

.clear-btn {
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 12px;
    border-radius: 14px;
}

@media (min-width: 768px) {
    .scrollable-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
