/* Ticket Marketplace Styles */

.content.tickets-page {
    background: #eef0f2;
    min-height: 100vh;
    position: relative;
}

.tickets-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Floating cart button (woofc-count style): квадрат с иконкой корзины, сверху справа — оранжевый кружок с количеством */
.ticket-cart-count {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #fff;
    color: #1A2C37;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.ticket-cart-count:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ticket-cart-count-icon {
    width: 28px;
    height: 28px;
    color: #1A2C37;
}

.ticket-cart-count-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ticket-cart-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 50%;
    background: #db752f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ticket-cart-count-bottom-right {
    bottom: 100px;
    right: 40px;
    left: auto;
}

.ticket-cart-count[data-count="0"] .ticket-cart-count-badge {
    display: none;
}

/* Header — как в дизайне (e-con-inner) */
.tickets-header {
    background: transparent;
    padding: 24px 0 16px;
    margin-bottom: 20px;
}

.tickets-title {
    font-size: 28px;
    font-weight: 700;
    color: #1A2C37;
    margin: 0 0 8px 0;
}

.tickets-subtitle {
    font-size: 15px;
    color: rgba(26, 44, 55, 0.65);
    margin: 0;
}

/* Filters — компактно как в дизайне */
.tickets-filters {
    background: transparent;
    padding: 12px 0 20px;
    margin-bottom: 24px;
}

.filters-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-search {
    flex: 1;
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px !important; /* место под иконку (14px + 20px) + зазор, чтобы плейсхолдер не заходил под иконку */
    border: 1px solid #e0e4e6;
    border-radius: 8px;
    font-size: 14px;
    color: #1A2C37;
    background: #fff;
    box-sizing: border-box;
    height: 44px;
}

.search-input:focus {
    outline: none;
    border-color: #db752f;
}

.search-input::placeholder {
    color: #808A90;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 20px;
    margin: auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #808A90;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Скрывать иконку, когда в поле есть текст, чтобы не перекрывала ввод */
.filter-search:has(.search-input:not(:placeholder-shown)) .search-icon,
.filter-search.search-has-value .search-icon {
    opacity: 0;
    visibility: hidden;
}

.search-icon svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0e4e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.view-toggle-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #808A90;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.view-toggle-btn:hover {
    color: #1A2C37;
    background: #f5f5f5;
}

.view-toggle-btn.active {
    color: #db752f;
    background: rgba(219, 117, 47, 0.1);
}

.filter-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e0e4e6;
    border-radius: 8px;
    color: #1A2C37;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-button:hover {
    background: #f8f9fa;
    border-color: #db752f;
    color: #db752f;
}

.filter-dropdown-wrap {
    position: relative;
}

.filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e4e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 20;
    display: none;
}

.filter-panel.is-open {
    display: block;
}

.filter-panel-section {
    margin-bottom: 14px;
}

.filter-panel-section:last-of-type {
    margin-bottom: 16px;
}

.filter-panel-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1A2C37;
    margin-bottom: 8px;
}

.filter-panel-radios,
.filter-panel-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-radio-label,
.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1A2C37;
    cursor: pointer;
    margin: 0;
}

.filter-radio,
.filter-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #db752f;
    cursor: pointer;
}

.filter-panel-reset {
    display: block;
    width: 100%;
    padding: 8px;
    font-size: 13px;
    color: #db752f;
    background: transparent;
    border: 1px solid #db752f;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.filter-panel-reset:hover {
    background: rgba(219, 117, 47, 0.08);
}

/* Tickets Grid */
.tickets-list {
    margin-bottom: 40px;
}

.tickets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* List view — карточки строчками как в дизайне */
.tickets-grid.tickets-list-view {
    grid-template-columns: 1fr;
    gap: 16px;
}

.tickets-grid.tickets-list-view .ticket-card {
    flex-direction: row;
    align-items: stretch;
}

.tickets-grid.tickets-list-view .ticket-image {
    width: 200px;
    min-width: 200px;
    height: auto;
    min-height: 140px;
}

.tickets-grid.tickets-list-view .ticket-info {
    flex: 1;
    padding: 16px 20px;
}

.tickets-grid.tickets-list-view .ticket-actions {
    padding: 16px 20px;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    border-left: 1px solid #eee;
}

/* Ticket Card */
.ticket-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 2px -1px rgba(209, 213, 215, 1),
                0 0 11px rgba(209, 213, 215, 0.3),
                8px 0 0 inset #db752f;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15),
                8px 0 0 inset #db752f;
}

.ticket-date {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: left;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.ticket-date-line {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1A2C37;
    line-height: 1.2;
    text-align: left;
}

.ticket-date-time {
    display: block;
    font-size: 14px;
    color: rgba(26, 44, 55, 0.7);
    margin-top: 4px;
    text-align: left;
}

.ticket-image {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ticket-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ticket-name {
    font-size: 16px;
    font-weight: 600;
    color: #1A2C37;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.ticket-match {
    font-size: 13px;
    color: rgba(26, 44, 55, 0.85);
    margin: 0 0 4px 0;
    line-height: 1.5;
    font-weight: 500;
}

.ticket-location {
    font-size: 13px;
    color: rgba(26, 44, 55, 0.7);
    margin: 0 0 4px 0;
    line-height: 1.5;
    flex: 1;
}

.ticket-meta {
    font-size: 13px;
    color: rgba(26, 44, 55, 0.8);
    margin-bottom: 16px;
    white-space: nowrap;
}

.ticket-meta .ticket-slots {
    color: rgba(26, 44, 55, 0.6);
}

.ticket-actions {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ticket-price {
    font-size: 18px;
    font-weight: 700;
    color: #db752f;
    margin-right: auto;
}

.ticket-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.ticket-btn-details {
    background: #2f3759;
    color: #fff;
}

.ticket-btn-details:hover {
    background: #3a456e;
}

.ticket-btn-buy {
    background: #db752f;
    color: #fff;
}

.ticket-btn-buy:hover {
    background: rgba(219, 117, 47, 0.8);
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.cart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1A2C37;
}

.cart-count {
    display: inline-block;
    background: #db752f;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 12px;
    margin-left: 8px;
}

/* Cart items — симпатичнее, иконка корзины вместо Remove, +/- вместо input */
.cart-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1A2C37;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.cart-item-info .cart-item-details {
    margin: 4px 0 8px 0;
}

.cart-item-info .cart-item-details .cart-item-match,
.cart-item-info .cart-item-details .cart-item-subtitle,
.cart-item-info .cart-item-details .cart-item-location,
.cart-item-info .cart-item-details .cart-item-category,
.cart-item-info .cart-item-details .cart-item-datetime,
.cart-item-info .cart-item-details .cart-item-slots {
    font-size: 13px;
    color: #5a6c75;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 600;
    color: #db752f;
    margin: 0;
}

.cart-item-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
}

.cart-item-qty-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e0e4e6;
    border-radius: 6px;
    background: #fff;
}

.cart-item-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #1A2C37;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.cart-item-qty-btn:hover {
    background: #f5f5f5;
    color: #db752f;
}

.cart-item-qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1A2C37;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: #c00;
}

.cart-item-remove svg {
    width: 18px;
    height: 18px;
}

.cart-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
}

.cart-close:hover {
    color: #333;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.cart-subtotal,
.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cart-subtotal {
    color: rgba(26, 44, 55, 0.7);
    font-size: 14px;
}

.cart-total {
    font-size: 18px;
    font-weight: 700;
    color: #1A2C37;
}

.cart-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.cart-btn {
    flex: none;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.cart-btn-checkout {
    background: #db752f;
    color: #fff;
}

.cart-btn-checkout:hover:not(:disabled) {
    background: rgba(219, 117, 47, 0.8);
}

.cart-btn-checkout:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

.cart-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(26, 44, 55, 0.85);
}

.cart-terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.cart-terms-checkbox a {
    color: #db752f;
    text-decoration: underline;
}

.cart-terms-checkbox a:hover {
    text-decoration: none;
}

.cart-continue {
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    color: #1A2C37;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

.cart-continue:hover {
    color: #db752f;
}

/* Modal */
.ticket-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #FFFFFF;
    max-width: 650px;
    margin: 15vh auto;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid rgba(26, 44, 55, 0.1);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #808A90;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #1A2C37;
}

.modal-body {
    padding: 0;
}

.modal-main-container {
    padding: 20px;
}

/* Image Gallery */
.modal-image-gallery {
    margin-bottom: 20px;
}

.modal-image-display {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    background-color: #f5f5f5;
}

/* Event Card Header */
.modal-event-header {
    margin-bottom: 24px;
}

.modal-event-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid #D1D5D7;
    border-radius: 8px;
}

.modal-event-period {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 80px;
}

.modal-event-date {
    background: #F5F7F8;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.modal-date-day {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #1A2C37;
    line-height: 1;
}

.modal-date-month {
    display: block;
    font-size: 14px;
    color: rgba(26, 44, 55, 0.7);
    margin-top: 4px;
    text-transform: uppercase;
}

.modal-event-time {
    font-size: 14px;
    font-weight: 500;
    color: #1A2C37;
    text-align: center;
}

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

.modal-event-name {
    font-size: 18px;
    font-weight: 600;
    color: #33434C;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.modal-event-location {
    font-size: 13px;
    color: rgba(26, 44, 55, 0.7);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.modal-event-meta {
    display: flex;
    gap: 16px;
    align-items: center;
}

.modal-availability {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-availability.open {
    color: #019719;
    background: rgba(1, 151, 25, 0.1);
}

.modal-capacity {
    font-size: 13px;
    color: rgba(26, 44, 55, 0.7);
}

.modal-capacity-number {
    font-weight: 600;
    color: #1A2C37;
}

.modal-event-price {
    display: flex;
    align-items: flex-start;
}

.modal-event-price p {
    font-size: 24px;
    font-weight: 700;
    color: #1A2C37;
    margin: 0;
}

/* Tabs Container */
.modal-tabs-container {
    margin-top: 20px;
}

.modal-tabs-header {
    border-bottom: 2px solid rgba(26, 44, 55, 0.1);
    margin-bottom: 20px;
}

.modal-tab {
    display: inline-block;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(26, 44, 55, 0.6);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.modal-tab.active {
    color: #1246D6;
    border-bottom-color: #1246D6;
}

/* Sections */
.modal-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1A2C37;
    margin: 0 0 12px 0;
}

.modal-timetable-section {
    margin-bottom: 24px;
}

.modal-timetable-text {
    font-size: 14px;
    color: rgba(26, 44, 55, 0.8);
    margin: 0;
}

.modal-timetable-date {
    font-weight: 500;
}

.modal-timetable-time {
    margin-left: 4px;
}

.modal-description-section {
    margin-bottom: 24px;
}

.modal-description-text {
    font-size: 14px;
    color: rgba(26, 44, 55, 0.8);
    line-height: 1.6;
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s;
}

.modal-description-text.expanded {
    max-height: none;
}

.modal-description-text p {
    margin: 0 0 12px 0;
}

.modal-show-more {
    background: none;
    border: none;
    color: #1246D6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    transition: color 0.3s;
}

.modal-show-more:hover {
    color: rgba(18, 70, 214, 0.8);
}

/* Organizer Section */
.modal-organizer-section {
    margin-top: 24px;
}

.modal-divider {
    height: 1px;
    background: rgba(26, 44, 55, 0.1);
    margin: 24px 0;
}

.modal-organizer-item {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.modal-organizer-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.modal-organizer-inner {
    flex: 1;
}

.modal-organizer-name {
    font-size: 16px;
    font-weight: 600;
    color: #1A2C37;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-organizer-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.modal-organizer-rank {
    font-size: 13px;
    color: rgba(26, 44, 55, 0.6);
    margin: 0;
}

.modal-organizer-about {
    margin-top: 16px;
}

.modal-organizer-text {
    font-size: 14px;
    color: rgba(26, 44, 55, 0.8);
    line-height: 1.6;
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s;
}

.modal-organizer-text.expanded {
    max-height: none;
}

.modal-organizer-text p {
    margin: 0 0 12px 0;
}

/* Quantity Popup */
.modal-quantity-popup {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid rgba(26, 44, 55, 0.1);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.modal-quantity-inner {
    padding: 24px;
}

.modal-quantity-heading {
    font-size: 16px;
    font-weight: 600;
    color: #1A2C37;
    margin-bottom: 8px;
}

.modal-quantity-hint {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 16px;
}

.modal-quantity-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-quantity-option-btn {
    padding: 12px 20px;
    border: 1px solid #D1D5D7;
    background: #FFFFFF;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1A2C37;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-quantity-option-btn:hover {
    border-color: #1246D6;
    background: #f0f4ff;
}

.modal-quantity-option-btn.active {
    border-color: #1246D6;
    background: #1246D6;
    color: #FFFFFF;
}

/* Блок выбора категории в модалке (несколько вариантов по subtitle) */
.modal-category-section {
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid rgba(26, 44, 55, 0.1);
    background: #F5F6F8;
}

.modal-category-section-inner {
    padding: 16px 24px;
    max-width: 100%;
    box-sizing: border-box;
}

.modal-category-heading {
    font-size: 14px;
    font-weight: 600;
    color: #1A2C37;
    margin-bottom: 10px;
}

.modal-category-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-category-option-btn {
    padding: 8px 14px;
    border: 1px solid #D1D5D7;
    background: #FFFFFF;
    border-radius: 6px;
    font-size: 14px;
    color: #1A2C37;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-category-option-btn:hover {
    border-color: #1246D6;
    color: #1246D6;
}

.modal-category-option-btn.active {
    border-color: #1246D6;
    background: #1246D6;
    color: #FFFFFF;
}

/* Блок выбора группы/опции внутри категории (5 вариантов с разным стоком: 4, 3, 2 slots) */
.modal-variant-section {
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid rgba(26, 44, 55, 0.1);
    background: #EEF0F2;
}

.modal-variant-section-inner {
    padding: 16px 24px;
    max-width: 100%;
    box-sizing: border-box;
}

.modal-variant-heading {
    font-size: 14px;
    font-weight: 600;
    color: #1A2C37;
    margin-bottom: 10px;
}

.modal-variant-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-variant-option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid #D1D5D7;
    background: #FFFFFF;
    border-radius: 6px;
    font-size: 14px;
    color: #1A2C37;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.modal-variant-option-btn:hover {
    border-color: #1246D6;
    color: #1246D6;
}

.modal-variant-option-btn.active {
    border-color: #1246D6;
    background: #E8EEFF;
    color: #1246D6;
}

.modal-variant-option-label {
    font-weight: 500;
}

.modal-variant-option-slots {
    color: #5A6B7A;
    font-size: 13px;
}

.modal-variant-option-btn.active .modal-variant-option-slots {
    color: #1246D6;
}

.modal-variant-option-price {
    width: 100%;
    margin-top: 2px;
    font-size: 13px;
    color: #5A6B7A;
}

/* Блок выбора количества в модалке — на всю ширину попапа */
.modal-quantity-section {
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid rgba(26, 44, 55, 0.1);
    background: #FAFBFC;
}

.modal-quantity-section-inner {
    padding: 20px 24px;
    max-width: 100%;
    box-sizing: border-box;
}

.modal-quantity-section .modal-quantity-heading {
    margin-bottom: 8px;
}

.modal-quantity-section .modal-quantity-hint {
    margin-bottom: 12px;
}

.modal-quantity-section .modal-quantity-options {
    margin-bottom: 0;
}

.modal-quantity-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #D1D5D7;
    background: #FFFFFF;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-quantity-btn:hover:not(:disabled) {
    background: #f9f9f9;
    border-color: #1A2C37;
}

.modal-quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.modal-quantity-input {
    flex: 1;
    height: 40px;
    border: 1px solid #D1D5D7;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #1A2C37;
}

.modal-quantity-input:focus {
    outline: none;
    border-color: #1246D6;
}

.modal-quantity-footer {
    display: flex;
    gap: 12px;
}

/* Modal Footer */
.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(26, 44, 55, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #FFFFFF;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    flex: 1;
}

.modal-btn-secondary {
    background: #FFFFFF;
    color: #1A2C37;
    border: 1px solid #D1D5D7;
}

.modal-btn-secondary:hover {
    background: rgba(26, 44, 55, 0.05);
}

.modal-btn-primary {
    background: #265CF2;
    color: #FFFFFF;
}

.modal-btn-primary:hover {
    background: rgba(38, 92, 242, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-cart-count-bottom-right {
        bottom: 90px;
        right: 20px;
        width: 52px;
        height: 52px;
    }

    .ticket-cart-count-icon {
        width: 24px;
        height: 24px;
    }

    .ticket-cart-count-badge {
        min-width: 18px;
        height: 18px;
        font-size: 11px;
        top: -3px;
        right: -3px;
    }

    .tickets-grid {
        grid-template-columns: 1fr;
    }

    .tickets-grid.tickets-list-view .ticket-image {
        width: 120px;
        min-width: 120px;
        min-height: 100px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-content {
        margin: 10px;
        margin-top: 5vh;
        max-height: 90vh;
        max-width: calc(100% - 20px);
    }

    .modal-main-container {
        padding: 16px;
    }

    .modal-event-card {
        flex-direction: column;
        gap: 12px;
    }

    .modal-event-period {
        flex-direction: row;
        justify-content: space-between;
        min-width: 100%;
    }

    .modal-event-date {
        padding: 8px;
    }

    .modal-date-day {
        font-size: 24px;
    }

    .modal-event-time {
        display: flex;
        align-items: center;
        font-size: 16px;
    }

    .modal-event-price {
        width: 100%;
        justify-content: flex-start;
    }

    .modal-event-price p {
        font-size: 20px;
    }

    .modal-image-display {
        height: 200px;
    }

    .modal-footer {
        flex-direction: column;
        padding: 16px;
    }

    .modal-btn {
        width: 100%;
    }

    .modal-quantity-popup {
        border-radius: 8px 8px 0 0;
    }

    .modal-quantity-inner {
        padding: 20px;
    }

    .modal-quantity-footer {
        flex-direction: column;
    }

    .filters-wrapper {
        flex-direction: column;
    }

    .filter-search {
        width: 100%;
    }

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

/* Success popup after purchase */
.ticket-success-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ticket-success-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 44, 55, 0.5);
    backdrop-filter: blur(4px);
}

.ticket-success-popup-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: ticket-success-popup-in 0.3s ease;
}

@keyframes ticket-success-popup-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ticket-success-popup-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-success-popup-icon svg {
    width: 36px;
    height: 36px;
}

.ticket-success-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: #1A2C37;
    margin: 0 0 12px;
    line-height: 1.3;
}

.ticket-success-popup-text {
    font-size: 15px;
    color: rgba(26, 44, 55, 0.8);
    margin: 0 0 16px;
    line-height: 1.5;
}

.ticket-success-popup-order {
    font-size: 14px;
    color: rgba(26, 44, 55, 0.7);
    margin: 0 0 24px;
}

.ticket-success-popup-order strong {
    color: #1A2C37;
    font-size: 18px;
    letter-spacing: 0.05em;
}

.ticket-success-popup-close {
    display: inline-block;
    padding: 12px 28px;
    background: #db752f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.ticket-success-popup-close:hover {
    background: #c56828;
}

.ticket-success-popup-close:active {
    transform: scale(0.98);
}

.cart-non-refundable-checkbox {
    margin-top: 8px;
}
