/* Mobile-First CSS - browse_subcategory.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 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-md: 6px;
    --radius-lg: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--secondary);
    background-color: var(--light-gray);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    padding: 0 16px;
}

/* Header Styles - Mobile First */
.page-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--medium-gray);
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 0 10px;
}

.logo {
    height: 36px;
    object-fit: contain;
}

.nav-actions {
    width: 100%;
}

.nav-box {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--light-gray);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.nav-btn {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 10px;
    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: 60px;
}

.nav-btn:hover {
    background: var(--light-gray);
    transform: translateY(-1px);
}

.nav-btn i {
    font-size: 16px;
    margin-bottom: 4px;
}

.btn-text {
    font-size: 11px;
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: 2px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* Breadcrumbs - Mobile */
.breadcrumbs {
    margin: 16px 0;
    font-size: 12px;
    color: var(--dark-gray);
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 22px;
    margin: 0 0 16px;
    color: var(--secondary);
    font-weight: 700;
}

.page-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Filter and sort bar - Mobile */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.results-count {
    font-size: 14px;
    color: var(--dark-gray);
    text-align: center;
}

.sort-filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.sort-select, .filter-btn {
    padding: 10px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    background: var(--white);
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Product Grid - Mobile */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

/* Fixed image container for mobile - smaller aspect ratio */
.product-image-container {
    position: relative;
    padding-top: 60%; /* Reduced from 75% for better mobile proportions */
    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: 15px; /* Reduced padding for mobile */
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* New Arrivals specific styles */
.new-arrival-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, #a82a2a 100%);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(197, 48, 48, 0.3);
    z-index: 2;
}

.quick-view-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateY(0);
}

.quick-view-btn:hover {
    background: var(--white);
    transform: scale(1.1);
}

.product-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #0047AB;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 13px;
    color: var(--dark-gray);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.price-container {
    margin: 8px 0 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

.original-price {
    font-size: 14px;
    color: var(--dark-gray);
    text-decoration: line-through;
}

.discount-percent {
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
    background: rgba(197, 48, 48, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
}

.product-specs {
    margin: 12px 0;
    font-size: 13px;
    color: var(--dark-gray);
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.spec-item {
    display: flex;
    margin-bottom: 5px;
    align-items: flex-start;
}

.spec-label {
    font-weight: 500;
    min-width: 80px;
    color: var(--secondary);
    font-size: 12px;
}

.spec-value {
    flex: 1;
    font-size: 12px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: #009999;
    color: var(--white);
    border: none;
    box-shadow: 0 2px 6px rgba(26, 43, 80, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, #3a4f7c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 43, 80, 0.3);
}

.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(-2px);
}

/* Product card footer for ratings */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stars {
    color: #FFB800;
    font-size: 12px;
}

.rating-count {
    font-size: 12px;
    color: var(--dark-gray);
}

.wishlist-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.wishlist-btn:hover, .wishlist-btn.active {
    color: var(--accent);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
}

.empty-state i {
    font-size: 40px;
    color: var(--dark-gray);
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 18px;
    margin: 0 0 8px;
    color: var(--secondary);
    font-weight: 600;
}

.empty-state p {
    color: var(--dark-gray);
    margin: 0 0 20px;
    font-size: 14px;
}

/* Notification */
.notification {
    position: fixed;
    top: 16px;
    right: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    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: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    color: #10b981;
    font-size: 18px;
}

.notification-text {
    font-weight: 500;
    font-size: 13px;
}

/* Cart button animation */
.pulse {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Tablet View - 481px and up */
@media (min-width: 481px) {
    .container {
        padding: 0 20px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 15px;
    }
    
    .nav-actions {
        width: auto;
    }
    
    .nav-box {
        justify-content: flex-end;
        gap: 8px;
    }
    
    .nav-btn {
        flex-direction: row;
        min-width: auto;
        padding: 8px 12px;
    }
    
    .btn-text {
        display: block;
        font-size: 13px;
        margin-left: 6px;
    }
    
    .breadcrumbs {
        font-size: 13px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .filter-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .sort-filter-options {
        flex-direction: row;
        width: auto;
        gap: 12px;
    }
    
    .sort-select, .filter-btn {
        width: auto;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .product-actions {
        flex-direction: row;
    }
}

/* Small Desktop/Large Tablet - 768px and up */
@media (min-width: 768px) {
    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 24px;
    }
    
    .page-header {
        padding: 16px 0;
    }
    
    .header-content {
        padding: 0 20px;
    }
    
    .logo {
        height: 40px;
    }
    
    .nav-btn {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    .nav-btn i {
        margin-right: 8px;
        margin-bottom: 0;
        font-size: 14px;
    }
    
    .breadcrumbs {
        font-size: 14px;
    }
    
    .page-title {
        font-size: 28px;
        margin: 0 0 24px;
    }
    
    .page-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
    }
    
    .filter-bar {
        padding: 16px 24px;
        border-radius: 12px;
    }
    
    .results-count {
        font-size: 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 28px;
        margin: 40px 0;
    }
    
    .product-card {
        border-radius: 16px;
    }
    
    /* Restore original image proportions for tablet/desktop */

/* Desktop View - 1024px and up */
@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }
    
    .header-content {
        padding: 0 24px;
    }
    
    .logo {
        height: 44px;
    }
    
    .nav-btn {
        padding: 10px 16px;
    }
    
    .breadcrumbs {
        font-size: 15px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .filter-bar {
        padding: 20px 28px;
    }
    
    .results-count {
        font-size: 16px;
    }
    
    .sort-select, .filter-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 32px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .product-description {
        font-size: 15px;
    }
    
    .current-price {
        font-size: 22px;
    }
    
    .original-price {
        font-size: 16px;
    }
    
    .spec-label, .spec-value {
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
    }
    
    .notification {
        max-width: 400px;
    }
    
    .notification-text {
        font-size: 14px;
    }
}