/* ========================================
   WAREHOUSE PRODUCT PAGE - Kho Tổng
   Figma Design Implementation
   ======================================== */

.warehouse-page {
    background: #f0f4f8;
    min-height: calc(100vh - 150px);
    padding: 0 0 50px;
}

/* Page Title Section */
.page-title-section {
    background: #fff;
    padding: 25px 0;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}

.page-title-section .page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-color, #0036A5);
    margin: 0 0 10px;
    text-transform: uppercase;
}

.page-title-section .page-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* Content Layout */
.warehouse-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding-top: 20px;
}

.warehouse-main {
    flex: 1;
    min-width: 0;
}

.warehouse-sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 20px;
}

/* Filter Bar */
.warehouse-filter {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-search {
    flex: 1;
    display: flex;
    gap: 10px;
    min-width: 250px;
}

.filter-search input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-search {
    padding: 10px 20px;
    background: var(--heading-color, #0036A5);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-search:hover {
    background: #002a7a;
}

.filter-sort select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
}

/* Category Tabs */
.warehouse-categories {
    background: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cate-tab {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #666;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.cate-tab:hover {
    background: #e5e5e5;
    color: #333;
}

.cate-tab.active {
    background: var(--primary-blue);
    color: #fff;
}

/* Product Grid */
.warehouse-products {
    background: transparent;
    padding: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* Product Card - Warehouse Style */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.product-image {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(180deg, #1e3a8a 0%, #3b82f6 40%, #93c5fd 70%, #dbeafe 100%);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 10px;
    text-align: center;
    background: #fff;
}

.product-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.3;
    min-height: 34px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.product-name:hover {
    color: var(--heading-color, #0036A5);
}

.product-price {
    margin-bottom: 8px;
}

.product-price .current-price {
    font-size: 15px;
    font-weight: 700;
    color: #f97316;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 6px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn.qty-minus {
    border-radius: 14px 0 0 14px;
}

.qty-btn.qty-plus {
    border-radius: 0 14px 14px 0;
}

.qty-btn:hover {
    background: #bae6fd;
}

.qty-btn:active {
    background: #7dd3fc;
}

.qty-input {
    width: 32px;
    height: 28px;
    border: none;
    background: #e0f2fe;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Product Stock */
.product-stock {
    font-size: 10px;
    color: #666;
    margin-bottom: 8px;
}

/* Add to Cart Button */
.btn-add-cart {
    width: 100%;
    padding: 8px 12px;
    background: var(--primary-blue, #0036A5);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: #002a7a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 54, 165, 0.3);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart i {
    font-size: 12px;
}

/* Pagination */
.warehouse-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.warehouse-pagination .pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.warehouse-pagination .pagination li a,
.warehouse-pagination .pagination li span {
    display: block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.warehouse-pagination .pagination li a:hover {
    background: var(--heading-color, #0036A5);
    border-color: var(--heading-color, #0036A5);
    color: #fff;
}

.warehouse-pagination .pagination li.active span {
    background: var(--heading-color, #0036A5);
    border-color: var(--heading-color, #0036A5);
    color: #fff;
}

.warehouse-pagination .pagination li.disabled span {
    color: #ccc;
    cursor: not-allowed;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-products i {
    font-size: 60px;
    margin-bottom: 15px;
}

.no-products p {
    font-size: 16px;
    margin: 0;
}

/* Sidebar - Member Benefit Box */
.member-benefit-box {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}

.benefit-header {
    background: #fff;
    color: var(--heading-color, #0036A5);
    padding: 15px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.benefit-header .benefit-icon {
    width: 36px;
    height: 36px;
    background: #facc15;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-header .benefit-icon i {
    font-size: 16px;
    color: #fff;
}

.benefit-body {
    padding: 15px;
}

.benefit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.benefit-row:last-child {
    border-bottom: none;
}

.benefit-label {
    font-size: 13px;
    color: #666;
}

.benefit-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.benefit-value.highlight {
    color: var(--heading-color, #0036A5);
    font-weight: 600;
}

.benefit-link {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 10px;
    color: var(--heading-color, #0036A5);
    font-size: 13px;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
}

.benefit-link:hover {
    text-decoration: underline;
}

.benefit-guest {
    text-align: center;
    padding: 10px 0;
}

.benefit-guest p {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
}

.btn-login {
    display: inline-block;
    padding: 10px 25px;
    background: var(--heading-color, #0036A5);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #002a7a;
    color: #fff;
}

/* Sidebar Banner */
.sidebar-banner {
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-banner img {
    width: 100%;
    display: block;
}

/* Responsive */
@media (max-width: 1199px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .warehouse-content {
        flex-direction: column-reverse;
    }
    
    .warehouse-sidebar {
        flex: 0 0 100%;
        width: 100%;
        position: static;
    }
    
    .member-benefit-box {
        margin-bottom: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .page-title-section .page-title {
        font-size: 20px;
    }
    
    .warehouse-filter {
        flex-direction: column;
    }
    
    .filter-search {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-name {
        font-size: 12px;
        min-height: 32px;
    }
    
    .product-price .current-price {
        font-size: 14px;
    }
    
    .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .qty-input {
        width: 28px;
        height: 24px;
        font-size: 11px;
    }
    
    .product-stock {
        font-size: 9px;
    }
}
