@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/*-----------------------------
| CSS CUSTOM PROPERTIES
------------------------------*/
:root {
    --primary-color: #2b5cff;
    --secondary-color: #eaf3ff;
    --accent-color: #dc143c;
    --text-color: #333;
    --bg-color: linear-gradient(to bottom right, #eaf3ff, #c9dbff);
    --card-bg: white;
    --shadow: 0 8px 20px rgba(0,0,0,0.1);
    --border-radius: 15px;
    --transition: 0.3s ease;
}

/* Dark mode variables */
body.dark {
    --text-color: white;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --secondary-color: #1e1e1e;
}

/*-----------------------------
| GLOBAL RESET & BASE STYLES
------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: var(--bg-color);
    min-height: 100vh;
    transition: var(--transition);
    color: var(--text-color);
    padding-bottom: 0;
}

body.dark {
    background: var(--bg-color);
    color: var(--text-color);
}

/*-----------------------------
| HEADER / HERO
------------------------------*/
header, .top-nav, .hero-section {
    text-align: left;
    padding: 40px 20px;
    background: white;
    color: var(--text-color);
    border-radius: var(--border-radius);
    margin: 20px;
    box-shadow: var(--shadow);
    animation: heroFadeIn 1s ease-out;
}

header h1, .nav-title, .hero-title {
    font-family: serif;
    letter-spacing: 2px;
}

.nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.nav-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transition: var(--transition);
    animation: logoPulse 2s ease-in-out infinite;
}

.nav-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 6px 12px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 8px 16px rgba(0,0,0,0.2); }
}

.hero-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin: 20px 0 10px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
}

body.dark .hero-subtitle {
    color: #aaa;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile adjustments for hero */
@media (max-width: 768px) {
    .hero-section {
        padding: 30px 15px;
        margin: 10px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-logo {
        width: 50px;
        height: 50px;
    }
}

/*-----------------------------
| FILTERS
------------------------------*/
.filters-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px;
}

.filters-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
    background: white;
    transition: 0.3s;
}

.filter-select:focus {
    border-color: #2b5cff;
}

.price-filter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-input {
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
    width: 100px;
    transition: 0.3s;
}

.price-input:focus {
    border-color: #2b5cff;
}

.clear-filters-button {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ccc;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
}

.clear-filters-button:hover {
    background: #e0e0e0;
}

/*-----------------------------
| SEARCH BAR
------------------------------*/
.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-group {
    position: relative;
}

.search-input {
    padding: 10px 15px 10px 35px;
    border-radius: 25px;
    border: 1px solid #ccc;
    outline: none;
    width: 300px;
    transition: 0.3s;
}

.search-input:focus {
    border-color: #2b5cff;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
}

.clear-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 14px !important;
    color: #999 !important;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-button:hover {
    color: #666 !important;
}

.search-button {
    background: #2b5cff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
}

.search-button:hover {
    opacity: 0.85;
}

/*-----------------------------
| CAMPUS DIVIDER
------------------------------*/
.campus-divider {
    background: #eaf3ff;
    padding: 10px 20px;
    border-radius: 15px;
    margin: 20px 0;
    font-weight: bold;
    color: #2b5cff;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dark .campus-divider {
    background: #1e1e1e;
}
/* =====================================
   PRODUCT GRID
===================================== */

.product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    padding: 10px;
    width: 100%;
    max-width: 100%;
}

/* =====================================
   PRODUCT CARD
===================================== */

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

/* =====================================
   PRODUCT IMAGE
===================================== */

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* =====================================
   BADGES
===================================== */

.badge.near {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* =====================================
   PRODUCT INFO
===================================== */

.product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* =====================================
   TITLE
===================================== */

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* =====================================
   VENDOR LINE
===================================== */

.vendor-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.vendor-name {
    font-weight: 500;
}

.verified-badge {
    color: #28a745;
    font-size: 0.9rem;
}

/* =====================================
   CATEGORY BADGE
===================================== */

.category-badge {
    background: #f2f2f2;
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

/* =====================================
   PRICE
===================================== */

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
}

/* =====================================
   ACTION BUTTONS
===================================== */

.product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    gap: 6px;
}

.action-btn {
    flex: 1;
    height: 38px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
}

/* Individual Button Styles */

.view-btn {
    background: var(--primary-color);
    color: white;
}

.chat-btn {
    background: #2b5cff;
    color: white;
}

.save-btn {
    background: #f3f3f3;
    color: #666;
}

.save-btn.saved {
    background: var(--accent-color);
    color: white;
}

.login-btn {
    background: #ccc;
    color: #666;
}

.action-btn:hover {
    opacity: 0.85;
}

/* =====================================
   MOBILE OPTIMIZATION
===================================== */

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        padding: 12px;
    }

    .product-title {
        font-size: 0.9rem;
        height: 38px;
    }

    .product-price {
        font-size: 1rem;
    }

    .action-btn {
        height: 36px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.95rem;
    }
}

/*-----------------------------
| DASHBOARD LAYOUT (for consistency, though not used)
------------------------------*/
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--card-bg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.main-with-sidebar {
    flex: 1;
    padding: 20px;
}

/*-----------------------------
| GRID & CARD (for saved items, profile sections)
------------------------------*/
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
    padding: 20px;
}

@media (min-width: 480px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 0.4s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.card-header h3 {
    color: var(--primary-color);
}

.card-body {
    padding: 10px 0;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-2 {
    margin-bottom: 10px;
}

.price {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.btn {
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    opacity: 0.85;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    opacity: 0.85;
}

.btn-danger {
    background: var(--accent-color);
    color: white;
}

.btn-danger:hover {
    opacity: 0.85;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.text-center {
    text-align: center;
}

.icon-xl {
    font-size: 3rem;
}

.hidden {
    display: none;
}

/*-----------------------------
| BOTTOM NAV
------------------------------*/
.bottom-nav {
    width: 100%;
    height: 70px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 15px 15px 0 0;
    border-top: 1px solid #ccc;
}

body.dark .bottom-nav {
    background: #1e1e1e;
}

.bottom-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

body.dark .bottom-nav a {
    color: white;
}

.bottom-nav a.active {
    color: #2b5cff;
}

.bottom-nav i {
    font-size: 1.2rem;
}

/*-----------------------------
| AUTH PAGES (Login/Register)
------------------------------*/
.auth-bg {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

.auth-card input, .auth-card select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
    font-size: 1rem;
}

.auth-card input:focus, .auth-card select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(43, 91, 255, 0.3);
}

.auth-card button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.auth-card button:hover {
    opacity: 0.85;
}

.auth-card .error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.auth-card p {
    text-align: center;
    margin-top: 20px;
}

.auth-card a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-card a:hover {
    text-decoration: underline;
}

/* Mobile adjustments for auth */
@media (max-width: 480px) {
    .auth-card {
        padding: 20px;
        margin: 10px;
    }

    .auth-card h2 {
        font-size: 1.5rem;
    }
}

/*-----------------------------
| RESPONSIVE ADJUSTMENTS
------------------------------*/
@media screen and (max-width: 768px) {
    .bottom-nav {
        display: flex !important;
    }

    .main-content {
        padding-bottom: 100px;
        width: 100% !important;
        max-width: 100% !important;
    }

    .product-actions {
        flex-direction: row;
        gap: 8px;
    }

    .action-btn, .save-btn, .chat-btn, .login-btn {
        padding: 10px 14px;
        font-size: 1rem;
        min-height: 44px;
        min-width: 44px;
    }

    .hero-section {
        padding: 20px 15px;
        margin: 10px;
    }

    .nav-left {
        flex-direction: row;
        gap: 12px;
    }

    .nav-logo {
        width: 45px;
        height: 45px;
    }

    .nav-title {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .filters-wrapper {
        flex-direction: column;
        width: 100%;
    }

    .filter-select, .price-input, .search-input {
        width: 100%;
        font-size: 16px;
    }

    .price-filter {
        width: 100%;
        justify-content: space-between;
    }

    .price-input {
        flex: 1;
    }

    .search-wrapper {
        flex-direction: column;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .search-button {
        width: 100%;
        padding: 12px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        padding: 12px;
    }

    .product-image img {
        height: 140px;
    }

    .product-title {
        font-size: 0.95rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .campus-divider {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

/* Prevent zoom on input focus for iOS */
input:focus, select:focus, textarea:focus {
    font-size: 16px;
}

/* Hero section improvements */
.hero-content {
    max-width: 100%;
}

.hero-text {
    display: flex;
    flex-direction: column;
}

.hero-section .nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

/* Filter improvements */
.filters-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-select {
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 91, 255, 0.1);
}

.price-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.price-input:hover {
    border-color: var(--primary-color);
}

.price-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 91, 255, 0.1);
}

.price-separator {
    color: #999;
    font-weight: 500;
}

.clear-filters-button {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.clear-filters-button:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Search improvements */
.search-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-input {
    padding: 16px 45px 16px 48px;
    border-radius: 50px;
    border: 2px solid #e8e8e8;
    font-size: 15px;
    transition: all 0.3s ease;
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.search-input:hover {
    border-color: #d0d0d0;
}

.search-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(43, 91, 255, 0.1), inset 0 2px 4px rgba(0,0,0,0.04);
    outline: none;
}

.search-input::placeholder {
    color: #aaa;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
}

.clear-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
}

.clear-button:hover {
    color: #666;
}

.search-button {
    background: linear-gradient(135deg, var(--primary-color), #1a4ad4);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 91, 255, 0.3);
}

/* Bottom nav now shown on all screens for consistency */

/* =====================================
   IMPROVED PRODUCT CARD STYLES
===================================== */

/* Product Image Container */
.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

/* Near Badge - Improved */
.near-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.4);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
}

.near-badge i {
    font-size: 0.7rem;
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-btn {
    background: white;
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.product-card:hover .overlay-btn {
    transform: translateY(0);
}

.overlay-btn:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 20px rgba(43, 91, 255, 0.4);
}

/* Product Details */
.product-details {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.product-details .product-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    height: auto;
    -webkit-line-clamp: 2;
}

.product-details .product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
    margin: 0;
}

/* Vendor Info */
.vendor-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

.vendor-info .vendor-name {
    font-weight: 500;
    color: #444;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vendor-info .vendor-name i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.verified-icon {
    color: #00c853;
    font-size: 0.9rem;
}

/* Category Tag */
.product-category {
    display: flex;
    align-items: center;
}

.category-tag {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    color: #666;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.category-tag i {
    font-size: 0.7rem;
    color: #999;
}

/* Product Buttons */
.product-buttons {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.product-buttons .btn-save,
.product-buttons .btn-chat,
.product-buttons .btn-view {
    flex: 1;
    padding: 10px 8px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-buttons .btn-save {
    background: #f5f5f5;
    color: #666;
}

.product-buttons .btn-save:hover {
    background: #ffebee;
    color: #dc143c;
}

.product-buttons .btn-save.saved {
    background: #dc143c;
    color: white;
}

.product-buttons .btn-chat {
    background: #e3f2fd;
    color: #1976d2;
}

.product-buttons .btn-chat:hover {
    background: #1976d2;
    color: white;
}

.product-buttons .btn-view {
    background: var(--primary-color);
    color: white;
}

.product-buttons .btn-view:hover {
    background: #1a4ad4;
    box-shadow: 0 4px 12px rgba(43, 91, 255, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-details {
        padding: 12px;
    }
    
    .product-details .product-title {
        font-size: 0.9rem;
    }
    
    .product-details .product-price {
        font-size: 1.1rem;
    }
    
    .product-buttons .btn-save,
    .product-buttons .btn-chat,
    .product-buttons .btn-view {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    .near-badge {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    .overlay-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .product-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-details .product-price {
        font-size: 1.2rem;
    }
    
    .product-buttons {
        flex-wrap: wrap;
    }
    
    .product-buttons .btn-save,
    .product-buttons .btn-chat,
    .product-buttons .btn-view {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
    }
}

/* =====================================
   NEW SHOP STRUCTURE STYLES
===================================== */

/* App Container */
.app {
    font-family: 'Poppins', sans-serif;
    background: #F8FAFC;
    margin: 0;
    min-height: 100vh;
    padding-bottom: 80px;
}

.app header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.app header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #1a1a1a;
}

.app header .icons {
    display: flex;
    gap: 15px;
}

.app header .icons i {
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}

/* Search Box */
.search-box {
    padding: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.search-box input:focus {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

/* Categories */
.categories {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar {
    display: none;
}

.categories button {
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    background: #E2E8F0;
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.85rem;
    color: #475569;
    transition: all 0.3s ease;
}

.categories button:hover {
    background: #cbd5e1;
}

.categories button.active {
    background: #2563EB;
    color: white;
}

/* Products Grid */
.products {
    padding: 15px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card .image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card .image .save-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.2s ease, color 0.2s ease;
    border: none;
    /* Default: faded heart when unsaved */
    opacity: 0.4;
    filter: grayscale(80%);
}

.card .image .save-btn:hover {
    transform: scale(1.1);
    opacity: 0.7;
    filter: grayscale(40%);
}

/* Saved state - solid red heart */
.card .image .save-btn.saved {
    opacity: 1;
    filter: grayscale(0%);
    color: #dc143c;
}

.card .image .near-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #00c853;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 500;
    z-index: 6;
}

.card h3 {
    margin: 0;
    padding: 10px 15px 5px;
    font-size: 1rem;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card .price {
    color: #16A34A;
    font-weight: bold;
    margin: 0;
    padding: 0 15px 5px;
    font-size: 1.1rem;
}

.card .location {
    color: #64748b;
    margin: 0;
    padding: 0 15px 10px;
    font-size: 0.85rem;
}

.card .vendor-info {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 15px 10px;
    font-size: 0.85rem;
    color: #64748b;
}

.card .vendor-info .verified-icon {
    color: #00c853;
    font-weight: bold;
}

.card .card-buttons {
    display: flex;
    gap: 10px;
    padding: 10px 15px 15px;
}

.card .card-buttons .btn-save,
.card .card-buttons .btn-chat {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.card .card-buttons .btn-save {
    background: #f1f5f9;
    color: #475569;
}

.card .card-buttons .btn-save:hover {
    background: #fee2e2;
    color: #dc143c;
}

.card .card-buttons .btn-save.saved {
    background: #dc143c;
    color: white;
}

.card .card-buttons .btn-chat {
    background: #e0f2fe;
    color: #0284c7;
}

.card .card-buttons .btn-chat:hover {
    background: #0284c7;
    color: white;
}

/* Campus Divider */
.campus-divider {
    background: #eaf3ff;
    padding: 10px 20px;
    border-radius: 15px;
    margin: 20px 0;
    font-weight: bold;
    color: #2b5cff;
    display: flex;
    align-items: center;
    gap: 10px;
}

