/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { width: 100%; overflow-x: hidden; font-family: Inter, sans-serif; background: #fff; color: #000; }

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Hamburger */
.hamburger {
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
.hamburger span {
    height: 3px; background: #000; border-radius: 3px;
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 22px;
}
.header-icons .icon {
    width: 28px !important;
    height: 28px !important;
    cursor: pointer;
}

/* SIDEBAR */
.side-menu {
    width: 260px;
    height: 100%;
    position: fixed;
    top: 0;
    left: -260px;
    background: #fff;
    padding-top: 15px;
    transition: 0.3s;
    z-index: 1200;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}
.side-menu.open { left: 0; }
.close-btn {
    font-size: 40px;
    background: none;
    border: none;
    margin-left: auto;
    margin-right: 20px;
    cursor: pointer;
}

/* Sidebar Menu */
.menu-links { list-style: none; }
.menu-item {
    padding: 15px 20px;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* Submenu */
.has-submenu {
    flex-direction: column;
    align-items: flex-start;
}
.submenu-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
}
.submenu-arrow { transition: .3s; }
.submenu-arrow.rotate { transform: rotate(180deg); }

.submenu {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    padding-left: 20px;
}
.submenu.open {
    max-height: 500px;
    padding: 10px 0;
}
.submenu-item {
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid #f1f1f1;
}

/* Auth Buttons */
.auth-links { display: flex; gap: 12px; padding: 20px; }
.btn-auth {
    padding: 8px 14px;
    border: 1px solid #000;
    border-radius: 6px;
}
.btn-auth.btn-primary {
    background: #000; color: #fff;
}

/* PRODUCT GRID */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    padding-bottom: 40px;
}

/* PRODUCT CARD */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* IMAGE */
.prod-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}
.prod-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #ff2d55;
    border-radius: 6px;
    z-index: 5;
}

/* PRODUCT BODY */
.prod-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

/* TITLE */
.prod-title {
    font-size: 15px;
    font-weight: 700;
    min-height: 38px;
}

/* PRICE */
.price-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.price {
    font-size: 17px;
    font-weight: 800;
}
.old-price {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
}

/* DESCRIPTION */
.prod-desc {
    font-size: 13px;
    color: #444;
    min-height: 35px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* BUTTON */
.btn-buy, .btn-cart {
    width: 100%;
    padding: 10px 0;
    color: #fff;
    background: #000;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    margin-top: auto;
}
.btn-cart { background: #ff9800; }

/* CART COUNT */
.cart-count {
    background: red;
    color: #fff;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 12px;
    position: absolute;
}

/* SEARCH OVERLAY */
.search-overlay {
    position: fixed;
    width: 100%; height: 100%;
    top: 0; left: 0;
    background: #fff;
    padding: 20px;
    display: none;
    z-index: 9999;
}
.search-overlay.active { display: block; }

#liveSearch {
    width: 100%;
    padding: 15px;
    border: 2px solid #000;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* SEARCH RESULT ITEM */
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}
.search-item img {
    width: 55px; height: 55px;
    border-radius: 6px;
    object-fit: cover;
}
.search-item span {
    font-size: 16px;
    font-weight: 600;
}

/* MODAL */
.modal {
    position: fixed;
    width: 100%; height: 100%;
    top: 0; left: 0;
    display: none;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
.modal-content {
    background: #fff;
    width: 90%;
    max-width: 380px;
    padding: 20px;
    border-radius: 16px;
    animation: popup .25s ease;
}
@keyframes popup { from{transform:scale(.7); opacity:0;} }

/* HelloBar */
.hellobar_container {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeSlide .6s ease;
}
@keyframes fadeSlide {
    0% {opacity: 0; transform: translateY(10px);}
    100% {opacity: 1; transform: translateY(0);}
}
