/* =========================
   GLOBAL RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* =========================
   NAVBAR
========================= */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    background: linear-gradient(135deg, #facc15, #eab308);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 20px;
}

/* LOGO */
.logo a {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    text-decoration: none;
    transition: 0.3s;
}

.logo a:hover {
    transform: scale(1.05);
}

/* SEARCH */
.search-box {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-box form {
    display: flex;
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 12px 18px;
    outline: none;
}

.search-box button {
    width: 50px;
    border: none;
    background: #111;
    color: white;
    cursor: pointer;
}

/* NAV LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

/* CART COUNT */
.cart-count {
    background: #111;
    color: #facc15;
    border-radius: 50%;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 5px;
}

/* USER MENU */
.user-menu {
    position: relative;
}

.user-name {
    font-weight: 700;
    cursor: pointer;
    color: #111;
}

/* DROPDOWN */
.user-menu .dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background: #fff;
    min-width: 180px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 10px;
}

.user-menu:hover .dropdown {
    display: block;
}

.user-menu .dropdown a {
    display: block;
    padding: 10px;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
}

.user-menu .dropdown a:hover {
    background: #fff7cc;
}

/* =========================
   TOAST (CENTER POPUP)
========================= */

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);

    min-width: 260px;
    max-width: 320px;

    padding: 16px 22px;
    border-radius: 14px;

    background: rgba(0,0,0,0.92);
    color: #fff;

    text-align: center;
    font-weight: 600;
    font-size: 15px;

    box-shadow: 0 12px 35px rgba(0,0,0,0.3);

    opacity: 0;
    transition: all 0.25s ease;
    z-index: 99999;
}

/* SHOW ANIMATION */
.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* SUCCESS */
.toast.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* ERROR */
.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ICON */
.toast::before {
    content: "✔";
    display: block;
    font-size: 18px;
    margin-bottom: 5px;
}

.toast.error::before {
    content: "✖";
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .navbar {
        padding: 15px 25px;
        gap: 15px;
    }

    .search-box form {
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .logo {
        text-align: center;
    }

    .search-box {
        width: 100%;
    }

    .search-box form {
        max-width: 100%;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 22px;
    }

    .nav-links {
        font-size: 14px;
        gap: 12px;
    }

    .search-box input {
        padding: 10px 14px;
    }

    .search-box button {
        width: 45px;
    }
}

/* =========================
   MOBILE TOUCH IMPROVEMENTS
========================= */

button, .btn-add-cart, .btn-remove, .wishlist-btn {
    touch-action: manipulation;
}

/* =========================
   PRODUCT CARD SMOOTH ANIMATION
========================= */

.product-card {
    transition: all 0.25s ease;
}

.product-card:hover {
    transform: translateY(-6px);
}

/* mobile tap effect */
.product-card:active {
    transform: scale(0.98);
}

/* =========================
   WISHLIST HEART BUTTON
========================= */

.wishlist-btn {
    transition: all 0.2s ease;
}

.wishlist-btn:active {
    transform: scale(1.2);
}

/* saved state */
.wishlist-btn.saved {
    color: #16a34a;
}

/* =========================
   BUTTON TOUCH FEEDBACK
========================= */

.btn-add-cart:active,
.btn-remove:active {
    transform: scale(0.96);
}

/* =========================
   LOADING STATE (OPTIONAL FUTURE USE)
========================= */

.loading {
    opacity: 0.6;
    pointer-events: none;
}
.wishlist-item {
    transition: all 0.25s ease;
}


