/* Promocodes Page Styles */

.promo-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px;
}

@media (max-width: 768px) {
    .promo-page {
        padding: 12px 8px 80px;
        min-height: calc(100vh - 160px);
    }
}

.promo-content {
    display: flex;
    gap: 24px;
}

/*
.promo-filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
    height: calc(100vh - 2rem);
    overflow-y: auto;
    padding-right: 1rem;
    transition: transform 0.3s ease;
}
*/

.promo-main {
    flex: 1;
    min-width: 0;
}

/*
.promo-toolbar {
    margin-bottom: 1rem;
    display: none;
}

.promo-mobile-filter-btn {
    width: 100%;
    padding: 0.75rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #333;
}

.promo-mobile-filter-btn:hover {
    background: #eee;
}
*/

/* APPLE STYLE HEADER - PROMOKODLAR */
.promo-page .modern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0;
    background: transparent;
}

.promo-page .header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.promo-page .page-title {
    font-size: 32px;
    font-weight: 700;
    color: #dc3545;
    margin: 0;
    letter-spacing: -0.5px;
    position: relative;
}

.promo-page .page-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #dc3545, #ff6b7a);
    border-radius: 2px;
}

.promo-page .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-page .action-btn {
    background: #fff;
    border: 1px solid #d2d2d7;
    color: #1d1d1f;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 400;
    min-width: 80px;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.promo-page .action-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff;
    box-shadow: 0 2px 6px rgba(220,53,69,0.15);
}



.promo-page .sort-dropdown {
    position: relative;
}

.promo-page .sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #d2d2d7;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    margin-top: 6px;
    z-index: 1000;
}

.promo-page .sort-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.promo-page .sort-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #1d1d1f;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 400;
}

.promo-page .sort-option:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.promo-page .sort-option.active {
    background: #dc3545;
    color: white;
    font-weight: 500;
}



/* RESPONSIVE */
@media (max-width: 768px) {
    .promo-page .modern-header {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
    }
    
    .promo-page .header-left {
        justify-content: flex-start;
        align-items: center;
        gap: 6px;
        flex: 1;
    }
    
    .promo-page .page-title {
        font-size: 24px;
        text-align: left;
    }
    
    .promo-page .page-title::after {
        width: 30px;
        height: 2px;
        bottom: -3px;
    }
    
    .promo-page .header-actions {
        justify-content: flex-end;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .promo-page .action-btn {
        flex: none;
        justify-content: center;
        min-width: 70px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .promo-page .sort-menu {
        min-width: 150px;
        right: 0;
        transform: translateY(-8px);
        left: auto;
    }
    
    .promo-page .sort-menu.active {
        transform: translateY(0);
    }
}

.promo-empty {
    text-align: center;
    padding: 40px;
    background: #f8f8f8;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.promo-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.promo-empty p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.promo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.promo-pagination-numbers {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
    font-size: 14px;
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pagination-btn:hover:not(.active):not(.disabled) {
    background: #f8f8f8;
}

.pagination-btn.active {
    background: #cc0000;
    color: white;
    border-color: #cc0000;
    cursor: default;
}

.pagination-btn.prev,
.pagination-btn.next {
    padding: 8px 15px;
    white-space: nowrap;
    gap: 5px;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9f9f9;
    pointer-events: none;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    width: 38px;
    height: 38px;
}

/* Copy notification */
.promocode-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(25, 25, 25, 0.9);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: bottom 0.3s ease;
    z-index: 1000;
}

.promocode-notification.show {
    bottom: 20px;
}

.promocode-notification i {
    color: #4CAF50;
    font-size: 18px;
}

/* Mobile Styles */
@media (max-width: 1200px) {
    .promo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .promo-page {
        padding: 12px;
    }

    .promo-title-sort-wrapper {
        margin-bottom: 12px;
    }

    .promo-title {
        font-size: 20px;
        text-align: center;
        margin-bottom: 0;
        flex-grow: 0;
    }

    .page-actions-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .promo-sort-wrapper {
        margin-left: 0;
        width: auto;
        display: flex;
        align-items: center;
    }

    .filter-toggle {
        flex: 0 1 auto;
    }

    .promo-sort-container {
        flex: 0 1 auto;
    }

    .promo-pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pagination-btn {
        font-size: 13px;
        padding: 6px 10px;
        min-width: 34px;
        height: 34px;
    }

    .pagination-btn.prev,
    .pagination-btn.next {
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .promo-page {
        padding: 10px;
    }

    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .promo-title-sort-wrapper {
        gap: 12px;
    }

    .promo-sort-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .filter-toggle,
    .promo-sort-container {
        width: 100%;
    }

    .filter-toggle {
        height: 34px;
        font-size: 13px;
    }

    .promo-sort-select {
        height: 34px;
        font-size: 13px;
    }
    
    .promo-title {
        font-size: 18px;
    }
    
    .pagination-btn {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .pagination-btn.prev,
    .pagination-btn.next {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .pagination-ellipsis {
        width: 30px;
        height: 30px;
    }
    
    .promocode-notification {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .promocode-notification i {
        font-size: 14px;
    }
}

/* New styles for the toolbar (can be shared with products.css if identical) */
.page-actions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}
