/* Packages Page Styles */

/* Hero Banner */
.hero-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    background-size: cover;
    background-position: center;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-banner h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-banner p {
    font-size: 1.2rem;
    max-width: 800px;
}

/* Header Wrapper */
.packages-header-wrapper {
    width: 100%;
    background-color: #1a1a1a;
}

/* Header Section */
.packages-header {
    background-color: #1a1a1a;
    padding: 40px 20px;
    color: white;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.packages-title h1 {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 5px 0;
    letter-spacing: 2px;
    text-align: left;
}

.packages-title p {
    margin: 0 0 30px 0;
    font-size: 16px;
    color: #fff;
    text-align: left;
}

/* Location Dropdown */
.location-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.location-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    /* border: 1px solid #ddd; */
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.location-pill i {
    font-size: 12px;
    color: #777;
}

.dropdown-locations {
    display: none;
    position: absolute;
    width: 100%;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.dropdown-locations.active {
    display: block;
}

.dropdown-locations a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.dropdown-locations a:hover {
    background-color: #f5f5f5;
}

.cart-btn {
    display: flex;
    align-items: center;
    background-color: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.cart-count {
    display: inline-block;
    background-color: white;
    color: #333;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    padding: 2px 6px;
    margin-left: 5px;
    margin-right: 5px;
}

/* --- ROW LAYOUT FOR LOCATION & PACKAGES --- */
.packages-outer-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.location-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.location-dropdown {
    margin: 0 auto;
    max-width: 350px;
}

/* Main Content Area */
.packages-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    gap: 30px;
}

.packages-container.single-col {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Sidebar Component */
.packages-sidebar {
    flex: 0 0 200px;
    padding: 15px;
    background-color: #fff;
    /* border: 1px solid #e0e0e0; */
    border-radius: 8px;
}

.sidebar-header {
    margin-bottom: 15px;
}

.sidebar-header h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: #333;
    text-transform: uppercase;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category {
    margin-bottom: 8px;
}

.category a {
    display: block;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 13px;
    line-height: 1.3;
}

.category a:hover {
    background-color: #f5f5f5;
}

.category.selected a {
    background-color: rgba(231, 231, 231, 0.5);
    color: #000;
    font-weight: 500;
    border-left: 3px solid #000;
}

.all-category a {
    background-color: #f9f9f9;
    font-weight: 600;
}

.all-category.selected a {
    background-color: rgba(231, 231, 231, 0.5);
    color: #000;
}

/* Main Content */
.packages-main {
    flex: 1;
    margin-top: 100px;
}

.packages-main.single-col-main {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Package Categories */
.kettlebells-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
}

.kettlebells-title {
    text-align: center !important;
    margin-bottom: 2rem;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.packages-grid.single-col-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: stretch;
    width: 100%;
}

@media (max-width: 1100px) {
    .packages-grid.single-col-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .packages-outer-wrapper {
        padding: 1rem 0.5rem;
    }
    .location-dropdown {
        max-width: 100%;
    }
    .packages-grid.single-col-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .packages-main.single-col-main {
        padding: 0;
    }
    .package-card {
        width: 100%;
    }
}

/* Package Card */
.package-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 10px;
    cursor: pointer;
}

.package-header {
    background-color: white;
    text-align: left;
    padding: 0;
    
}

.studio-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #666;
    color: #fff;
    padding: 10px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    border-radius: 0;
}

.package-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin: 0;
    padding: 20px 20px 15px;
    text-align: left;
    line-height: 1.4;
}

.price-container {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 20px 20px;
    gap: 1rem;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    line-height: 1.1;
    margin-right: 1rem;
    letter-spacing: -1px;
}

.classes-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-left: 20px;
}

.classes-container:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background-color: #ccc;
}

.classes-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin-right: 0.25rem;
}

.class-label {
    font-size: 1rem;
    color: #555;
    font-weight: 400;
}

.package-content {
    padding: 0 20px 20px;
}

.package-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.add-to-cart-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    margin-top: 20px;
}

.add-to-cart-btn:hover {
    background-color: #555;
}

.add-to-cart-btn.added {
    background-color: #2ecc71;
}

.package-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.package-card-link:hover .package-card {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 1.5px 6px rgba(0,0,0,0.09);
    transform: translateY(-2px) scale(1.015);
    border-color: #aaa;
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
    margin-bottom: 20px;
    width: 100%;
}

.mobile-filter-btn button {
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-filter-btn button i {
    margin-right: 8px;
}

.close-filter-btn {
    display: none;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 12px;
    color: #333;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .packages-container {
        flex-direction: column;
    }
    .packages-main {
        margin-top: 0;
    }
    
    .mobile-filter-btn {
        display: block;
    }
    
    .close-filter-btn {
        display: block;
    }
    
    .sidebar-header {
        position: relative;
    }
    
    .packages-sidebar {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 30px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .packages-sidebar.active {
        transform: translateY(0);
    }
    
    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .packages-header {
        padding: 30px 15px;
        
    }
    .packages-main {
        margin-top: 0;
    }
    
    .packages-title h1 {
        font-size: 36px;
        /* align-items: flex-start; */
        text-align: left;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .location-selector {
        width: 100%;
        max-width: 300px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .packages-main {
        margin-top: 0;
    }
    .packages-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        /* padding: 20px 30px; */
    }
    
    .hero-banner h1 {
        font-size: 2rem;
    }
    
    .hero-banner p {
        font-size: 1rem;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .price {
        font-size: 1.5rem;
    }
    .classes-count {
        font-size: 1.2rem;
    }
    .class-label {
        font-size: 0.95rem;
    }
}

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

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 0;
    border-radius: 8px;
    width: 400px;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.class-details-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.class-modal-info {
    flex: 1;
}

.class-modal-info h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.class-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
}

.class-modal-close:hover {
    color: #333;
}

.class-modal-body {
    padding: 20px 0;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.payment-option {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.payment-option h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.payment-description {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.payment-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.payment-features li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.payment-features li i {
    margin-right: 8px;
    color: #28a745;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        width: 95%;
    }
}