/* ===================================
   Vendor.php Page Styles
   =================================== */

/* Shop Sidebar Styles */
.shop-sidebar {
    position: relative;
}

@media (max-width: 991.98px) {
    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        padding: 20px;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .shop-sidebar.active {
        left: 0;
    }
    
    .shop-sidebar__close {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 10000;
    }
}

@media (max-width: 575.98px) {
    .shop-sidebar {
        width: 100%;
        left: -100%;
    }
}

/* Overlay for mobile */
@media (max-width: 991.98px) {
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        display: none;
    }
    
    .shop-sidebar.active + .sidebar-overlay {
        display: block;
    }
}

/* Branch Grid Styles */
.branch-grid {
    min-height: 400px;
}

.branch-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.branch-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.branch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.branch-card:hover::before {
    opacity: 1;
}

.branch-details {
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
}

.branch-details .d-flex {
    align-items: center;
}

.branch-details i {
    width: 16px;
    text-align: center;
}

/* Distance Badge */
.bg-gray-100 {
    background-color: #f9fafb !important;
}

/* Star Rating */
.text-warning-600 {
    color: #f59e0b !important;
}

.text-gray-300 {
    color: #d1d5db !important;
}

/* Button Styles */
.btn.flex-1 {
    flex: 1;
    min-width: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 1199.98px) {
    .branch-grid .col-xl-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 991.98px) {
    .branch-grid .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .branch-grid .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .branch-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 575.98px) {
    .branch-card {
        padding: 16px;
    }
    
    .btn.flex-1 {
        flex: none;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .d-flex.gap-12.flex-wrap {
        flex-direction: column;
        gap: 8px !important;
    }
}

/* Empty State */
.py-80 {
    padding-top: 80px;
    padding-bottom: 80px;
}

.text-6xl {
    font-size: 4rem;
}

/* Pagination Styles */
.pagination {
    margin: 0;
}

.page-link {
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.page-item.active .page-link {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: #fff !important;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

/* Statistics */
.gap-24 > * + * {
    margin-left: 24px;
}

.gap-12 > * + * {
    margin-left: 12px;
}

.gap-8 > * + * {
    margin-left: 8px;
}

/* Responsive Pagination */
@media (max-width: 575.98px) {
    .pagination .page-link {
        height: 40px;
        width: 40px;
        font-size: 12px;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start !important;
    }
    
    .gap-24 {
        gap: 16px !important;
    }
}

/* Location Modal Styles */
#locationModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    border-top: 1px solid #eee;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Vendor Card Styles */
.vendor-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.vendor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.vendor-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.vendor-card__title {
    margin-bottom: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.vendor-card__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vendor-card__distance {
    font-size: 0.875rem;
    color: #007bff;
    margin-bottom: 12px;
}

.vendor-card__content {
    padding-top: 16px;
}

.vendor-card__address {
    color: #6b7280;
    margin-bottom: 16px;
}

.vendor-card__contact {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

/* Responsive Vendor Cards */
@media (max-width: 767.98px) {
    .vendor-card {
        margin-bottom: 20px;
    }
    
    .vendor-card__header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .vendor-card__actions {
        align-self: flex-start;
    }
}

@media (max-width: 575.98px) {
    .vendor-card {
        padding: 16px;
    }
    
    .vendor-card__contact {
        flex-direction: column;
        gap: 8px;
    }
    
    .vendor-card__contact .btn {
        width: 100%;
    }
}
