/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #F97316;
    /* Vibrant Orange */
    --primary-dark: #EA580C;
    --secondary-color: #1E293B;
    /* Dark Slate */
    --text-color: #334155;
    --bg-color: #F8FAFC;
    /* Off-white */
    --card-bg: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
    /* Space for floating cart */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 20px 40px;
    border-radius: 0 0 24px 24px;
    margin-bottom: 20px;
    text-align: center;
}

.hero-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
    font-size: 32px;
}

/* Category Grid (Home) */
.category-grid-card {
    position: relative;
    height: 160px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
    text-decoration: none;
    display: block;
    background: #f0f0f0;
}

.category-grid-card:active {
    transform: scale(0.98);
}

.category-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
    z-index: 1;
}

.category-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: flex-end;
    padding: 15px;
    z-index: 2;
}

.category-grid-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    z-index: 3;
    position: relative;
}

/* Sticky Category Bar (Detail Page) */
.category-nav {
    position: sticky;
    top: 0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 10px 0;
    overflow-x: auto;
    white-space: nowrap;
}

.category-pill {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    background: white;
    border-radius: var(--radius-full);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-pill.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    height: 100%;
}

.product-card:active {
    transform: scale(0.98);
}

.product-img-wrapper {
    position: relative;
    padding-top: 66%;
    /* 3:2 Aspect Ratio */
    overflow: hidden;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.product-desc {
    font-size: 12px;
    color: #64748B;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    min-height: 32px;
}

.price-tag {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--primary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add:hover {
    background: var(--primary-color);
    color: white;
}

/* Floating Cart Button */
.fab-cart {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    width: 90%;
    max-width: 400px;
    justify-content: space-between;
    border: none;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.cart-count-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* Modal Styling */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
}

width: 100%;
height: 100%;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
display: flex;
align-items: flex-end;
padding: 15px;
z-index: 2;
}

.category-grid-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    z-index: 3;
    position: relative;
}

/* Sticky Category Bar (Detail Page) */
.category-nav {
    position: sticky;
    top: 0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 10px 0;
    overflow-x: auto;
    white-space: nowrap;
}

.category-pill {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    background: white;
    border-radius: var(--radius-full);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-pill.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    height: 100%;
}

.product-card:active {
    transform: scale(0.98);
}

.product-img-wrapper {
    position: relative;
    padding-top: 66%;
    /* 3:2 Aspect Ratio */
    overflow: hidden;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.product-desc {
    font-size: 12px;
    color: #64748B;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    min-height: 32px;
}

.price-tag {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-color);
    color: var(--primary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add:hover {
    background: var(--primary-color);
    color: white;
}

/* Floating Cart Button */
.fab-cart {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    width: 90%;
    max-width: 400px;
    justify-content: space-between;
    border: none;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.cart-count-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* Modal Styling */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-footer {
    border-top: none;
}

/* Utilities */
.section-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-left: 5px;
    border-left: 4px solid var(--primary-color);
    margin-left: 10px;
}

.btn-like {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-like:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.btn-like.liked {
    color: #ef4444;
}

.btn-like.liked i {
    animation: pulse 0.3s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}