/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fff;
    color: #000;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%; /* Prevent iOS zoom on input focus */
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    background: #fff;
    padding: 20px;
    position: relative;
    padding-bottom: 100px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background-color: #3EB489;
    padding: 15px 20px;
    border-radius: 15px;
}
.logo {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    font-style: italic;
    flex-shrink: 0;
}
.subtitle {
    color: #fff;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 4px;
}
.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    border: 2px solid #fff;
    flex-shrink: 0;
}

/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 20px;
}
.search-bar {
    width: 100%;
    padding: 12px 50px 12px 45px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    color: #000;
}
.search-bar:focus {
    outline: none;
    box-shadow: 0 4px 25px rgba(62, 180, 137, 0.3);
}
.search-bar::placeholder {
    color: #666;
}
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2rem;
}
.menu-dots {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Category Buttons */
.categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: auto; /* Allow horizontal scroll on very small screens if needed */
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}
.categories::-webkit-scrollbar {
    display: none; /* Hide scrollbar on webkit */
}
.category-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    color: #000;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    flex-shrink: 0;
}
.category-btn.active {
    background-color: #3EB489;
    color: #fff;
    box-shadow: 0 4px 15px rgba(62, 180, 137, 0.3);
}
.category-btn:hover {
    transform: translateY(-2px);
}

/* Product Grid */
.prod-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.prod-card {
    background: #fff;
    border-radius: 20px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}
.prod-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}
.product-image {
    width: 100%;
    height: 120px;
    border-radius: 15px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.prod-card:hover .product-image img {
    transform: scale(1.05);
}
.prod-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #000;
    text-align: center;
}
.prod-title .subtitle-title {
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    display: block;
}
.prod-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #3EB489;
    font-size: 0.8rem;
    margin-top: 4px;
}
.prod-rating i.fa-heart {
    color: #3EB489;
    font-size: 0.9rem;
}

/* ===============================
   Bottom Navigation (UPDATED)
   =============================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
    z-index: 1000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Nav Item */
.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    color: #999;
    transition: all 0.25s ease;
}

/* Icon */
.bottom-nav .nav-icon {
    font-size: 1.6rem;
    color: inherit;
    transition: transform 0.25s ease, color 0.25s ease;
}

/* Active / Hover */
.bottom-nav .nav-item.active,
.bottom-nav .nav-item:hover {
    color: #3EB489;
}

.bottom-nav .nav-item.active .nav-icon {
    transform: translateY(-2px);
}

/* Anchor reset */
.bottom-nav a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}

/* Cart Badge */
.bottom-nav .cart-count-badge {
    position: absolute;
    top: 8px;
    right: 28%;
    background: #ff4757;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.add-btn:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(62, 180, 137, 0.5);
}
/* Wave effect */
/* .bottom-nav::before {
    content: '';
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: #FFFFFF;
    z-index: -1;
    border-bottom-left-radius: 50% 40px;
    border-bottom-right-radius: 50% 40px;
} */

/* Enhanced Responsive Design for All Screen Sizes */
/* Extra small phones (e.g., iPhone SE, <375px width) */
@media (max-width: 374px) {
    .app-container {
        padding: 8px;
        padding-bottom: 90px;
    }
    .header {
        padding: 10px 12px;
        gap: 8px;
    }
    .logo {
        font-size: 1.4rem;
    }
    .subtitle {
        font-size: 0.8rem;
    }
    .profile-pic {
        width: 35px;
        height: 35px;
    }
    .search-bar {
        padding: 10px 40px 10px 30px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    .search-icon {
        left: 12px;
        font-size: 1.1rem;
    }
    .menu-dots {
        right: 12px;
        font-size: 1.3rem;
    }
    .categories {
        gap: 4px;
        justify-content: flex-start;
    }
    .category-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-image {
        height: 90px;
    }
    .prod-card {
        padding: 10px;
    }
    .prod-title {
        font-size: 0.8rem;
    }
    .prod-title .subtitle-title {
        font-size: 0.7rem;
    }
    .bottom-nav {
        height: 60px;
        padding: 8px 15px;
    }
    .nav-icon {
        font-size: 1.3rem;
    }
    .add-btn {
        bottom: 75px;
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
}

/* Small phones (375px-479px, e.g., iPhone 12 mini) */
@media (min-width: 375px) and (max-width: 479px) {
    .app-container {
        padding: 10px;
        padding-bottom: 95px;
    }
    .header {
        padding: 12px 15px;
        gap: 10px;
    }
    .logo {
        font-size: 1.5rem;
    }
    .categories {
        gap: 5px;
        justify-content: flex-start;
    }
    .category-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-image {
        height: 100px;
    }
    .search-bar {
        padding: 10px 40px 10px 35px;
        font-size: 0.9rem;
    }
    .bottom-nav {
        height: 65px;
        padding: 8px 15px;
    }
    .add-btn {
        bottom: calc(28px + 10px); /* Dynamic: nav height + 10px gap for lower positioning */
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
}

/* Medium phones (480px-767px, landscape or larger phones) */
@media (min-width: 480px) and (max-width: 767px) {
    .app-container {
        padding: 15px;
        padding-bottom: 100px;
    }
    .header {
        padding: 15px 18px;
        gap: 10px;
    }
    .logo {
        font-size: 1.6rem;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-image {
        height: 110px;
    }
    .categories {
        gap: 8px;
        justify-content: center;
    }
    .category-btn {
        padding: 7px 14px;
        font-size: 0.85rem;
    }
    .search-bar {
        padding: 11px 45px 11px 40px;
        font-size: 0.95rem;
    }
    .add-btn {
        bottom: 82px;
        width: 58px;
        height: 58px;
    }
}

/* Tablets and larger (768px+) - Hide mobile nav */
@media (min-width: 768px) {
    .app-container {
        padding: 40px;
        max-width: 768px;
        margin: 0 auto;
        padding-bottom: 60px;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .product-image {
        height: 150px;
    }
    .header {
        margin-bottom: 30px;
        padding: 20px 25px;
    }
    .logo {
        font-size: 1.9rem;
    }
    .categories {
        justify-content: flex-start;
        gap: 12px;
    }
    .category-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    .bottom-nav,
    .add-btn {
        display: none;
    }
}

/* Large desktops (1024px-1439px) */
@media (min-width: 1024px) {
    .app-container {
        padding: 60px;
        max-width: 1024px;
        padding-bottom: 60px;
    }
    .prod-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .product-image {
        height: 160px;
    }
    .logo {
        font-size: 2.2rem;
    }
    .header {
        padding: 20px 30px;
    }
    .search-bar {
        padding: 14px 55px 14px 48px;
        font-size: 1.05rem;
    }
}

/* Extra large (1440px+) */
@media (min-width: 1440px) {
    .app-container {
        padding: 80px;
        max-width: 1440px;
        padding-bottom: 80px;
    }
    .prod-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    .product-image {
        height: 180px;
    }
    .logo {
        font-size: 2.5rem;
    }
    .categories {
        gap: 15px;
    }
    .category-btn {
        padding: 12px 24px;
        font-size: 1.1rem;
    }
    .search-bar {
        padding: 15px 60px 15px 50px;
        font-size: 1.1rem;
    }
}

/* Landscape orientation adjustments for phones */
@media (orientation: landscape) and (max-height: 500px) {
    .app-container {
        padding: 10px;
        padding-bottom: 80px;
    }
    .header {
        padding: 10px 15px;
        flex-wrap: nowrap;
    }
    .prod-grid {
        gap: 10px;
    }
    .product-image {
        height: 80px;
    }
    .categories {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    .bottom-nav {
        height: 60px;
        padding: 5px 15px;
    }
    .add-btn {
        bottom: calc(60px + 5px); /* Even tighter gap for compact screens */
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* High DPI adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .prod-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Ensure safe areas on notched devices (iPhone X+) */
@supports (padding: max(0px)) {
    .app-container {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.prod-card.clickable-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.prod-card.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.prod-card.clickable-card:active {
    transform: scale(0.98);
}

/* Added feedback overlay */
.added-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(62, 180, 137, 0.95);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.added-feedback.show {
    opacity: 1;
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.add-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #3EB489;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
    cursor: pointer;
}

.nav-cart-count {
    top: -10px;
    right: 12px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fff;
    color: #000;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%; /* Prevent iOS zoom on input focus */
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    background: #fff;
    padding: 20px;
    position: relative;
    padding-bottom: 100px;
}

/* Header */ 
//user header
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background-color: #3EB489;
    padding: 15px 20px;
    border-radius: 15px;
}
.logo {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    font-style: italic;
    flex-shrink: 0;
}
.subtitle {
    color: #fff;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 4px;
}
.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    border: 2px solid #fff;
    flex-shrink: 0;
}

/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 20px;
}
.search-bar {
    width: 100%;
    padding: 12px 50px 12px 45px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    color: #000;
}
.search-bar:focus {
    outline: none;
    box-shadow: 0 4px 25px rgba(62, 180, 137, 0.3);
}
.search-bar::placeholder {
    color: #666;
}
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2rem;
}
.menu-dots {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Category Buttons */
.categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: auto; /* Allow horizontal scroll on very small screens if needed */
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}
.categories::-webkit-scrollbar {
    display: none; /* Hide scrollbar on webkit */
}
.category-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    color: #000;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    flex-shrink: 0;
}
.category-btn.active {
    background-color: #3EB489;
    color: #fff;
    box-shadow: 0 4px 15px rgba(62, 180, 137, 0.3);
}
.category-btn:hover {
    transform: translateY(-2px);
}

/* Product Grid */
.prod-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.prod-card {
    background: #fff;
    border-radius: 20px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}
.prod-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}
.product-image {
    width: 100%;
    height: 120px;
    border-radius: 15px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.prod-card:hover .product-image img {
    transform: scale(1.05);
}
.prod-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #000;
    text-align: center;
}
.prod-title .subtitle-title {
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    display: block;
}
.prod-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #3EB489;
    font-size: 0.8rem;
    margin-top: 4px;
}
.prod-rating i.fa-heart {
    color: #3EB489;
    font-size: 0.9rem;
}

/* ===============================
   Bottom Navigation (UPDATED)
   =============================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
    z-index: 1000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* Nav Item */
.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    color: #999;
    transition: all 0.25s ease;
}

/* Icon */
.bottom-nav .nav-icon {
    font-size: 1.6rem;
    color: inherit;
    transition: transform 0.25s ease, color 0.25s ease;
}

/* Active / Hover */
.bottom-nav .nav-item.active,
.bottom-nav .nav-item:hover {
    color: #3EB489;
}

.bottom-nav .nav-item.active .nav-icon {
    transform: translateY(-2px);
}

/* Anchor reset */
.bottom-nav a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}

/* Cart Badge */
.bottom-nav .cart-count-badge {
    position: absolute;
    top: 8px;
    right: 28%;
    background: #ff4757;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.add-btn:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(62, 180, 137, 0.5);
}
/* Wave effect */
/* .bottom-nav::before {
    content: '';
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: #FFFFFF;
    z-index: -1;
    border-bottom-left-radius: 50% 40px;
    border-bottom-right-radius: 50% 40px;
} */

/* Enhanced Responsive Design for All Screen Sizes */
/* Extra small phones (e.g., iPhone SE, <375px width) */
@media (max-width: 374px) {
    .app-container {
        padding: 8px;
        padding-bottom: 90px;
    }
    .header {
        padding: 10px 12px;
        gap: 8px;
    }
    .logo {
        font-size: 1.4rem;
    }
    .subtitle {
        font-size: 0.8rem;
    }
    .profile-pic {
        width: 35px;
        height: 35px;
    }
    .search-bar {
        padding: 10px 40px 10px 30px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    .search-icon {
        left: 12px;
        font-size: 1.1rem;
    }
    .menu-dots {
        right: 12px;
        font-size: 1.3rem;
    }
    .categories {
        gap: 4px;
        justify-content: flex-start;
    }
    .category-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .product-image {
        height: 90px;
    }
    .prod-card {
        padding: 10px;
    }
    .prod-title {
        font-size: 0.8rem;
    }
    .prod-title .subtitle-title {
        font-size: 0.7rem;
    }
    .bottom-nav {
        height: 60px;
        padding: 8px 15px;
    }
    .nav-icon {
        font-size: 1.3rem;
    }
    .add-btn {
        bottom: 75px;
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
}

/* Small phones (375px-479px, e.g., iPhone 12 mini) */
@media (min-width: 375px) and (max-width: 479px) {
    .app-container {
        padding: 10px;
        padding-bottom: 95px;
    }
    .header {
        padding: 12px 15px;
        gap: 10px;
    }
    .logo {
        font-size: 1.5rem;
    }
    .categories {
        gap: 5px;
        justify-content: flex-start;
    }
    .category-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-image {
        height: 100px;
    }
    .search-bar {
        padding: 10px 40px 10px 35px;
        font-size: 0.9rem;
    }
    .bottom-nav {
        height: 65px;
        padding: 8px 15px;
    }
    .add-btn {
        bottom: calc(28px + 10px); /* Dynamic: nav height + 10px gap for lower positioning */
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
}

/* Medium phones (480px-767px, landscape or larger phones) */
@media (min-width: 480px) and (max-width: 767px) {
    .app-container {
        padding: 15px;
        padding-bottom: 100px;
    }
    .header {
        padding: 15px 18px;
        gap: 10px;
    }
    .logo {
        font-size: 1.6rem;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-image {
        height: 110px;
    }
    .categories {
        gap: 8px;
        justify-content: center;
    }
    .category-btn {
        padding: 7px 14px;
        font-size: 0.85rem;
    }
    .search-bar {
        padding: 11px 45px 11px 40px;
        font-size: 0.95rem;
    }
    .add-btn {
        bottom: 82px;
        width: 58px;
        height: 58px;
    }
}

/* Tablets and larger (768px+) - Hide mobile nav */
@media (min-width: 768px) {
    .app-container {
        padding: 40px;
        max-width: 768px;
        margin: 0 auto;
        padding-bottom: 60px;
    }
    .prod-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .product-image {
        height: 150px;
    }
    .header {
        margin-bottom: 30px;
        padding: 20px 25px;
    }
    .logo {
        font-size: 1.9rem;
    }
    .categories {
        justify-content: flex-start;
        gap: 12px;
    }
    .category-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    .bottom-nav,
    .add-btn {
        display: none;
    }
}

/* Large desktops (1024px-1439px) */
@media (min-width: 1024px) {
    .app-container {
        padding: 60px;
        max-width: 1024px;
        padding-bottom: 60px;
    }
    .prod-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .product-image {
        height: 160px;
    }
    .logo {
        font-size: 2.2rem;
    }
    .header {
        padding: 20px 30px;
    }
    .search-bar {
        padding: 14px 55px 14px 48px;
        font-size: 1.05rem;
    }
}

/* Extra large (1440px+) */
@media (min-width: 1440px) {
    .app-container {
        padding: 80px;
        max-width: 1440px;
        padding-bottom: 80px;
    }
    .prod-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    .product-image {
        height: 180px;
    }
    .logo {
        font-size: 2.5rem;
    }
    .categories {
        gap: 15px;
    }
    .category-btn {
        padding: 12px 24px;
        font-size: 1.1rem;
    }
    .search-bar {
        padding: 15px 60px 15px 50px;
        font-size: 1.1rem;
    }
}

/* Landscape orientation adjustments for phones */
@media (orientation: landscape) and (max-height: 500px) {
    .app-container {
        padding: 10px;
        padding-bottom: 80px;
    }
    .header {
        padding: 10px 15px;
        flex-wrap: nowrap;
    }
    .prod-grid {
        gap: 10px;
    }
    .product-image {
        height: 80px;
    }
    .categories {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    .bottom-nav {
        height: 60px;
        padding: 5px 15px;
    }
    .add-btn {
        bottom: calc(60px + 5px); /* Even tighter gap for compact screens */
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* High DPI adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .prod-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Ensure safe areas on notched devices (iPhone X+) */
@supports (padding: max(0px)) {
    .app-container {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.prod-card.clickable-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.prod-card.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.prod-card.clickable-card:active {
    transform: scale(0.98);
}

/* Added feedback overlay */
.added-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(62, 180, 137, 0.95);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.added-feedback.show {
    opacity: 1;
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.add-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #3EB489;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 100;
    cursor: pointer;
}

.nav-cart-count {
    top: -10px;
    right: 12px;
}

.auth-buttons {
    display: flex;
    gap: 12px; /* Space between buttons */
    align-items: center;
}

.btn-login,
.btn-signup {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px; /* Pill-shaped for a modern, friendly look */
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

/* Sign In button - secondary style (outline) */
.btn-login {
    background-color: transparent;
    color: #555;
    border: 2px solid #ddd;
}

.btn-login:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
    color: #333;
}

.btn-signup {
    background-color: #FF6B6B; 
    color: white;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.btn-signup:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.btn-signup:active {
    transform: translateY(0);
}

/* Top Navbar - Desktop */
.top-nav {
    background: #fff;
    border-bottom: 1px solid #eee;
}

/* Make search wider & nicer on desktop */
@media (min-width: 1024px) {
    .top-nav .search-bar {
        width: 420px;
        font-size: 1.05rem;
        padding: 14px 60px 14px 52px;
    }
}

/* Ensure bottom nav is hidden on desktop */
@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    /* Optional: give main content more breathing room when top nav is present */
    .app-container {
        padding-top: 20px; /* or more if you have announcement bar etc. */
    }
}

/* Fix/add subtle hover on desktop nav links */
.top-nav a:hover {
    color: #3EB489;
    transition: color 0.2s;
}

.profile-dropdown-container {
    position: relative;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid #eee;
    transition: all 0.2s;
}

.profile-pic:hover {
    border-color: #fb6b90; /* or your brand color */
    transform: scale(1.08);
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 12px 16px;
    background: #f8f9fa;
    text-align: center;
}

.dropdown-header strong {
    display: block;
    font-size: 1.1rem;
}

.dropdown-header small {
    color: #666;
    font-size: 0.85rem;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 0px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item.logout {
    color: #e74c3c;
}

.dropdown-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}