/* ============================================
   BRANCHES PAGE STYLES
   ============================================ */

.branches-page {
    padding: 60px 0 80px;
    background: linear-gradient(
        180deg,
        var(--white) 0%,
        rgba(98, 65, 30, 0.02) 100%
    );
    min-height: 70vh;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 42px;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
    color: var(--primary);
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 18px;
    font-family: var(--font-primary);
    font-weight: var(--font-medium);
    color: var(--text-light);
    margin: 0;
}

/* Search Section */
.search-section {
    margin-bottom: 40px;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(98, 65, 30, 0.1);
}

.search-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 65, 30, 0.2);
}

.clear-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.clear-search:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Branches Grid */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.branch-card-detailed {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(98, 65, 30, 0.08);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.branch-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.branch-image-wrapper {
    height: 250px;
    overflow: hidden;
    position: relative;
}

/* Branch Status Badge */
.branch-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-primary);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.branch-status-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.branch-status-badge.open {
    background: rgba(34, 197, 94, 0.95);
    color: var(--white);
}

.branch-status-badge.closed {
    background: rgba(239, 68, 68, 0.95);
    color: var(--white);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.branch-status-badge.open .status-dot {
    background: var(--white);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
}

.branch-status-badge.closed .status-dot {
    background: var(--white);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.status-text {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.branch-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.branch-card-detailed:hover .branch-image {
    transform: scale(1.1);
}

.branch-image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        rgba(98, 65, 30, 0.05) 0%,
        rgba(98, 65, 30, 0.1) 100%
    );
    color: var(--primary);
    position: relative;
}

.branch-details {
    padding: 25px;
}

.branch-name {
    font-size: 24px;
    font-family: var(--font-primary);
    font-weight: var(--font-extra-bold);
    color: var(--primary);
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.branch-detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 12px;
}

.branch-detail-item:last-child {
    margin-bottom: 0;
}

.branch-detail-item i {
    color: var(--primary);
    font-size: 18px;
    margin-top: 3px;
    flex-shrink: 0;
}

.branch-detail-content {
    flex: 1;
}

.branch-detail-content strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.branch-detail-content p {
    font-size: 15px;
    color: var(--primary);
    margin: 0;
    line-height: 1.5;
}

.branch-detail-content a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.branch-detail-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.branch-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.btn-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-map:hover {
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 65, 30, 0.2);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination-wrapper .pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrapper .pagination li {
    display: inline-block;
}

.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li span {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary);
    background: var(--white);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    font-weight: var(--font-medium);
}

.pagination-wrapper .pagination li.active span,
.pagination-wrapper .pagination li a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination-wrapper .pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 80px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.empty-state-title {
    font-size: 28px;
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 15px 0;
}

.empty-state-text {
    font-size: 16px;
    color: var(--text-light);
    margin: 0 0 30px 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--primary-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 65, 30, 0.2);
}

/* Responsive */
@media (max-width: 992px) {
    .branches-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }

    .page-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .branches-page {
        padding: 40px 0 60px;
    }

    .page-title {
        font-size: 30px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .branches-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
        justify-content: center;
    }

    .branch-image-wrapper {
        height: 200px;
    }

    .branch-status-badge {
        top: 8px;
        left: 8px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .status-dot {
        width: 6px;
        height: 6px;
    }

    .status-text {
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 26px;
    }

    .branch-name {
        font-size: 20px;
    }

    .branch-details {
        padding: 20px;
    }
}
