/* ========================================
   MEMBER WAREHOUSE PAGE - Đổi Điểm Hội Viên / Sỉ Hội Viên
   Figma Design Implementation
   ======================================== */

.member-warehouse-page {
    background: #f0f4f8;
    min-height: calc(100vh - 150px);
    padding: 0 0 50px;
}

/* Page Title Section */
.page-title-section {
    background: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
}

.page-title-section .page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--heading-color, #0036A5);
    margin: 0;
    text-align: center;
}

/* Section Styles */
.warehouse-section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.warehouse-section .section-header {
    background: #fff;
    color: var(--heading-color, #0036A5);
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.warehouse-section .section-header .section-icon {
    width: 36px;
    height: 36px;
    background: #facc15;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.warehouse-section .section-header span {
    flex: 1;
}

.warehouse-section .section-header .section-icon i {
    font-size: 16px;
    color: #fff;
}

.warehouse-section .section-body {
    padding: 20px;
}

/* Delivery Section */
.delivery-section .section-body {
    padding: 0;
}

/* Delivery Card - Figma Layout */
.delivery-card {
    display: flex;
    gap: 30px;
    padding: 25px;
    border-bottom: 1px solid #e5e5e5;
}

.delivery-image {
    width: 400px;
    height: 225px; /* 400 * 9/16 = 225 - tỷ lệ 16:9 */
    flex-shrink: 0;
    background: #d9d9d9;
    border-radius: 8px;
    overflow: hidden;
}

.delivery-image .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.delivery-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.delivery-content .delivery-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--heading-color, #0036A5);
    margin: 0 0 10px;
}

.delivery-content .delivery-desc {
    font-size: 15px;
    color: #333;
    margin: 0 0 15px;
}

.delivery-content .delivery-address,
.delivery-content .delivery-phone {
    font-size: 15px;
    color: #333;
    margin: 0 0 8px;
}

.delivery-content .delivery-address strong,
.delivery-content .delivery-phone strong {
    font-weight: 700;
}

.delivery-content .delivery-stock {
    font-size: 15px;
    color: #333;
    margin: 15px 0;
}

.delivery-content .delivery-stock i {
    color: var(--heading-color, #0036A5);
    margin-right: 8px;
}

.btn-choose-delivery {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    color: var(--heading-color, #0036A5);
    border: 1px solid var(--heading-color, #0036A5);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    width: fit-content;
}

.btn-choose-delivery:hover {
    background: var(--heading-color, #0036A5);
    color: #fff;
}

/* Delivery Note - Figma Style */
.delivery-note {
    display: flex;
    align-items: center;
    margin: 0 25px 25px;
    padding: 12px 15px;
    background: #fff5ce;
    border-radius: 5px;
    font-size: 14px;
    color: #b89300;
    position: relative;
    overflow: hidden;
}

.delivery-note .note-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: #fc0;
    border-radius: 5px 0 0 5px;
}

.delivery-note p {
    margin: 0;
    padding-left: 10px;
}

.delivery-note strong {
    font-weight: 700;
}

/* Delivery Empty State */
.delivery-empty {
    text-align: center;
    padding: 40px 20px;
}

.delivery-empty .empty-icon {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.delivery-empty .empty-icon i {
    font-size: 32px;
    color: #999;
}

.delivery-empty .empty-text {
    font-size: 15px;
    color: #666;
    margin: 0 0 15px;
}

.btn-update-address {
    display: inline-block;
    padding: 10px 25px;
    background: var(--heading-color, #0036A5);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-update-address:hover {
    background: #002a7a;
    color: #fff;
}

/* Office Section */
.office-filter {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.office-filter .filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.office-filter .form-input,
.office-filter .form-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.office-filter .search-office {
    flex: 1;
    min-width: 200px;
}

.office-filter .filter-city,
.office-filter .filter-district {
    min-width: 180px;
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #006FFF 0%, #1823B9 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-filter:hover {
    opacity: 0.9;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-btn:hover {
    background: #e0e0e0;
}

.tag-btn.active {
    background: var(--heading-color, #0036A5);
    color: #fff;
    border-color: var(--heading-color, #0036A5);
}

/* City Group */
.city-group {
    margin-bottom: 30px;
}

.city-group:last-child {
    margin-bottom: 0;
}

.city-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--heading-color, #0036A5);
    display: inline-block;
}

/* Office Grid */
.office-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Office Card */
.office-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.office-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.office-image {
    background: #f5f5f5;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
    .office-image {
        height: 0;
        padding-bottom: 56.25%; /* 9/16 = 0.5625 */
    }
    .office-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

.office-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.office-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    background: #f5f5f5;
    border: 2px dashed #ddd;
}

.office-placeholder span {
    font-size: 13px;
    color: #999;
}

.office-info {
    padding: 15px;
}

.office-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.4;
}

.office-address,
.office-phone {
    font-size: 13px;
    color: #666;
    margin: 0 0 6px;
    line-height: 1.4;
}

.office-address i,
.office-phone i {
    width: 16px;
    color: var(--heading-color, #0036A5);
    margin-right: 6px;
}

.office-stock {
    font-size: 13px;
    color: #333;
    margin: 0 0 6px;
}

.office-stock i {
    width: 16px;
    color: #facc15;
    margin-right: 6px;
}

.office-address strong,
.office-phone strong {
    color: #333;
}

.btn-view-office {
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 8px 16px;
    background: transparent;
    color: var(--heading-color, #0036A5);
    border: 1px solid var(--heading-color, #0036A5);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-view-office:hover {
    background: var(--heading-color, #0036A5);
    color: #fff;
}

/* No Office */
.no-office {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.no-office i {
    font-size: 60px;
    margin-bottom: 15px;
}

.no-office p {
    font-size: 16px;
    margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .office-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .delivery-card {
        gap: 20px;
    }
    
    .delivery-image {
        width: 320px;
        height: 180px; /* 320 * 9/16 */
    }
}

@media (max-width: 767px) {
    .member-warehouse-page .page-title {
        font-size: 20px;
    }
    
    .office-grid {
        grid-template-columns: 1fr;
    }
    
    .office-filter .filter-row {
        flex-direction: column;
    }
    
    .office-filter .search-office,
    .office-filter .filter-city,
    .office-filter .filter-district {
        width: 100%;
    }
    
    .delivery-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .delivery-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    .delivery-content .delivery-title {
        font-size: 18px;
    }
    
    .btn-choose-delivery {
        width: 100%;
    }
    
    .delivery-note {
        margin: 0 20px 20px;
    }
    
    .filter-tags {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }
    
    .tag-btn {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {

    
    .delivery-card {
        padding: 15px;
    }
    
    .delivery-note {
        margin: 0 15px 15px;
    }
}
