/* Mobile-First CSS - browse_field.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

:root {
    --primary: #1a2b50;
    --primary-light: #2d3f6b;
    --secondary: #2d3748;
    --accent: #c53030;
    --light-gray: #f7fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #4a5568;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.12);
    --radius-md: 6px;
    --radius-lg: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--secondary);
    background-color: var(--light-gray);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    padding: 0 12px;
}

/* Header Styles - Consistent with browse_subcategory */
.page-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--medium-gray);
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 0 8px;
}

.logo {
    height: 32px;
    object-fit: contain;
}

.nav-actions {
    width: 100%;
}

.nav-box {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--light-gray);
    padding: 5px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.nav-btn {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    min-width: 55px;
}

.nav-btn:hover {
    background: var(--light-gray);
    transform: translateY(-1px);
}

.nav-btn i {
    font-size: 14px;
    margin-bottom: 3px;
}

.btn-text {
    font-size: 10px;
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: 1px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 12px 0;
    font-size: 11px;
    color: var(--dark-gray);
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 3px;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 20px;
    margin: 0 0 6px;
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.page-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Field Header Section */
.field-header {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.field-overlay {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px 15px;
    text-align: center;
    color: var(--white);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Products Section */
.field-products {
    margin: 20px 0;
}

.results-count {
    font-size: 13px;
    color: var(--dark-gray);
    margin-bottom: 12px;
    text-align: center;
}

.field-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Product Card - More Compact for Mobile */
.field-product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    position: relative;
    height: fit-content;
}

.field-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-color: #e8e8e8;
}

.product-image-container {
    position: relative;
    padding-top: 55%; /* Reduced from 60% for more compact cards */
    background: linear-gradient(135deg, #f9f9f9 0%, #f1f1f1 100%);
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px; /* Reduced padding */
    transition: transform 0.3s ease;
}

.field-product-card:hover .product-image {
    transform: scale(1.03);
}

.quick-view-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 2;
    font-size: 12px;
}

.field-product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateY(0);
}

.quick-view-btn:hover {
    background: var(--white);
    transform: scale(1.05);
}

.product-content {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #0047AB;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.product-description {
    font-size: 12px;
    color: var(--dark-gray);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.price-container {
    margin: 6px 0 12px;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 400;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    border: 1px solid transparent;
    min-height: 36px;
}

.btn-primary {
    background: #009999;
    color: var(--white);
    border: none;
    box-shadow: 0 1px 3px rgba(26, 43, 80, 0.15);
}

.btn-primary:hover {
    background: #008080;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(26, 43, 80, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(26, 43, 80, 0.05);
    transform: translateY(-1px);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
}

.empty-state i {
    font-size: 32px;
    color: var(--dark-gray);
    margin-bottom: 10px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 16px;
    margin: 0 0 6px;
    color: var(--secondary);
    font-weight: 600;
}

.empty-state p {
    color: var(--dark-gray);
    margin: 0 0 16px;
    font-size: 13px;
}

/* Notification */
.notification {
    position: fixed;
    top: 12px;
    right: 12px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border: 1px solid var(--medium-gray);
    max-width: 280px;
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    color: #10b981;
    font-size: 16px;
}

.notification-text {
    font-weight: 500;
    font-size: 12px;
}

/* Cart button animation */
.pulse {
    animation: pulse 0.4s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tablet View - 481px and up */
@media (min-width: 481px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 12px;
    }
    
    .nav-actions {
        width: auto;
    }
    
    .nav-box {
        justify-content: flex-end;
        gap: 6px;
    }
    
    .nav-btn {
        flex-direction: row;
        min-width: auto;
        padding: 7px 10px;
    }
    
    .btn-text {
        display: block;
        font-size: 12px;
        margin-left: 5px;
    }
    
    .breadcrumbs {
        font-size: 12px;
    }
    
    .field-header {
        height: 200px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .field-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-actions {
        flex-direction: row;
    }
    
    .field-product-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .field-product-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
}

/* Small Desktop/Large Tablet - 768px and up */
@media (min-width: 768px) {
    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .page-header {
        padding: 12px 0;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .logo {
        height: 36px;
    }
    
    .nav-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .nav-btn i {
        margin-right: 6px;
        margin-bottom: 0;
        font-size: 13px;
    }
    
    .breadcrumbs {
        font-size: 13px;
    }
    
    .field-header {
        height: 240px;
        margin: 16px 0 28px;
    }
    
    .page-title {
        font-size: 26px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .field-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 24px;
    }
    
    .field-product-card {
        border-radius: 12px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    }
    
    .field-product-card:hover {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-description {
        font-size: 12px;
    }
    
    .current-price {
        font-size: 17px;
    }
    
    .btn {
        padding: 9px 12px;
        font-size: 12px;
    }
}

/* Desktop View - 1024px and up */
@media (min-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    
    .header-content {
        padding: 0 20px;
    }
    
    .logo {
        height: 40px;
    }
    
    .nav-btn {
        padding: 9px 14px;
    }
    
    .breadcrumbs {
        font-size: 14px;
    }
    
    .field-header {
        height: 280px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .field-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 28px;
    }
    
    .product-content {
        padding: 14px;
    }
    
    .product-title {
        font-size: 15px;
        margin: 0 0 6px;
    }
    
    .product-description {
        font-size: 13px;
        margin: 0 0 8px;
        line-height: 1.4;
    }
    
    .price-container {
        margin: 6px 0 12px;
    }
    
    .current-price {
        font-size: 18px;
    }
    
    .product-actions {
        gap: 8px;
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .notification {
        max-width: 350px;
    }
    
    .notification-text {
        font-size: 13px;
    }
}