* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b9d;
    --primary-dark: #e55a8a;
    --secondary-color: #c44569;
    --accent-color: #f8b500;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Dark theme */
body.dark-theme {
    --primary-color: #ff6b9d;
    --primary-dark: #e55a8a;
    --secondary-color: #c44569;
    --accent-color: #f8b500;
    --text-dark: #e0e0e0;
    --text-light: #b0b0b0;
    --bg-light: #1a1a1a;
    --bg-white: #2d2d2d;
    --border-color: #404040;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-theme {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 80px;
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.menu-toggle,
.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 24px;
}

.header-icons {
    display: flex;
    gap: 10px;
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.search-bar {
    display: none;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.search-bar.active {
    display: block;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.search-close {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 20px;
    color: var(--text-dark);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-menu li a:hover {
    background: var(--bg-light);
}

.sidebar-menu li a i {
    width: 20px;
    color: var(--primary-color);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
}

.overlay.active {
    display: block;
}

/* Hero Section */
.hero {
    position: relative;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    margin-bottom: 20px;
    border-radius: 0 0 25px 25px;
    overflow: hidden;
}

.hero-content {
    padding: 40px 20px;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
}

.hero-content p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

body.dark-theme .indicator.active {
    background: white;
}

/* Categories */
.categories {
    padding: 20px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.category-card {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 20px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.category-card:active {
    transform: scale(0.95);
}

.category-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.category-card span {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
}

/* Products */
.products {
    padding: 0 20px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.see-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:active {
    transform: scale(0.98);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
}

.product-badge.new {
    background: var(--accent-color);
}

.product-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.product-favorite:active {
    transform: scale(0.9);
}

.product-favorite i {
    color: var(--primary-color);
}

.product-image {
    width: 100%;
    height: 180px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.product-brand {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 12px;
}

.product-rating i {
    color: var(--accent-color);
    font-size: 12px;
}

.product-rating span {
    color: var(--text-light);
    margin-left: 3px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.price-old {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
    font-weight: 500;
    opacity: 0.8;
}

.price-current {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
    box-sizing: border-box;
    margin-top: auto;
}

.product-info .btn-add-cart,
.product-card .btn-add-cart,
.catalog-grid .btn-add-cart,
#catalogPage .btn-add-cart,
.page#catalogPage .btn-add-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
    box-sizing: border-box;
    margin-top: auto;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

.btn-add-cart:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

.btn-add-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.product-info .btn-add-cart:hover,
.product-card .btn-add-cart:hover,
.catalog-grid .btn-add-cart:hover,
#catalogPage .btn-add-cart:hover,
.page#catalogPage .btn-add-cart:hover {
    background: var(--primary-dark);
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:active {
    background: var(--primary-dark);
}

.btn-outline {
    padding: 10px 20px;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:active {
    background: white;
    color: var(--primary-color);
}

/* Offers */
.offers {
    padding: 0 20px 20px;
}

.offer-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: var(--shadow);
}

.offer-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.offer-content p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.offer-icon {
    font-size: 48px;
    opacity: 0.8;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -100%;
    top: 0;
    width: 320px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
    font-size: 20px;
    color: var(--text-dark);
}

.cart-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 10px;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cart-quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    padding: 0;
}

.cart-quantity-btn:active {
    transform: scale(0.9);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.cart-quantity {
    min-width: 25px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.remove-item {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-item:active {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    transform: scale(0.9);
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--border-color);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.total-price {
    color: var(--primary-color);
    font-size: 22px;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    transition: color 0.2s;
    padding: 5px 15px;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Page Container */
.page-container {
    min-height: calc(100vh - 140px);
}

.page {
    display: none;
    padding-bottom: 20px;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-white);
    margin-bottom: 15px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
}

.filter-btn {
    background: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
}

/* Filters */
.filters {
    background: var(--bg-white);
    padding: 20px;
    margin: 0 20px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: none;
}

.filters.active {
    display: block;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.price-range {
    margin-top: 10px;
}

.price-range input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-light);
}

.sort-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-white);
    color: var(--text-dark);
    outline: none;
}

.apply-filters {
    width: 100%;
    margin-top: 15px;
}

/* Favorites Page */
.favorites-content {
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 14px;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Profile Page */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 40px 20px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-header h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.profile-header p {
    font-size: 14px;
    opacity: 0.9;
}

.profile-menu {
    padding: 0 20px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.2s;
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item:active {
    background: var(--bg-light);
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
}

.menu-item-content {
    flex: 1;
}

.menu-item-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.menu-item-content p {
    font-size: 13px;
    color: var(--text-light);
}

.profile-menu-item i.fa-chevron-right {
    color: var(--text-light);
    font-size: 14px;
}

.profile-menu-item.logout .menu-item-icon {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.profile-menu-item.logout .menu-item-content h3 {
    color: #e74c3c;
}

/* Orders Page */
.back-btn {
    background: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
}

.order-tabs {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.order-tabs::-webkit-scrollbar {
    display: none;
}

.order-tab {
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.order-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.orders-list {
    padding: 0 20px;
}

.order-card {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.order-date {
    font-size: 13px;
    color: var(--text-light);
}

.order-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.shipped {
    background: #cce5ff;
    color: #004085;
}

.order-status.delivered {
    background: #d4edda;
    color: #155724;
}

.order-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-progress {
    padding: 15px;
    background: var(--bg-light);
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-steps .step {
    font-size: 11px;
    color: var(--text-light);
}

.progress-steps .step.completed {
    color: var(--primary-color);
    font-weight: 600;
}

.order-items {
    padding: 15px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.order-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.order-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-light);
}

.order-item-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
    color: var(--text-dark);
}

.order-item-info p {
    font-size: 13px;
    color: var(--text-light);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.order-total {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.order-total span:first-child {
    font-size: 12px;
    color: var(--text-light);
}

.total-amount {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.order-actions {
    display: flex;
    gap: 10px;
}

.btn-order-action,
.btn-order-track,
.btn-order-cancel,
.btn-order-detail {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-order-action {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-order-track {
    background: #007bff;
    color: white;
    border: none;
}

.btn-order-cancel {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.btn-order-detail {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-order-action:active,
.btn-order-track:active {
    transform: scale(0.95);
}

/* Addresses Page */
.add-address-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.addresses-list {
    padding: 0 20px 20px;
}

.address-card {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    padding: 15px;
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.address-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.address-default {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.address-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-set-default {
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 12px;
    color: var(--text-dark);
    cursor: pointer;
    white-space: nowrap;
}

.btn-edit-address,
.btn-delete-address {
    background: var(--bg-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.2s;
}

.btn-edit-address:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-delete-address:hover {
    background: #ffebee;
    color: #d32f2f;
}

.address-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.address-details p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.5;
}

.address-details i {
    color: var(--primary-color);
    width: 18px;
    margin-top: 2px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-white);
    border-radius: 20px 20px 0 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    background: var(--bg-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 18px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border-color);
}

.address-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:active {
    background: var(--border-color);
}

.form-actions .btn-primary {
    flex: 1;
    padding: 12px;
}

/* Notifications Page */
.notifications-content {
    padding: 0 20px 20px;
}

.settings-section {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.settings-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
    margin-right: 15px;
}

.setting-info h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.setting-info p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notifications History */
.notifications-history {
    margin-top: 15px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s;
    position: relative;
}

.notification-item.unread {
    background: #e3f2fd;
    border-left: 3px solid var(--primary-color);
}

.notification-item:active {
    transform: scale(0.98);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.notification-item.unread .notification-icon {
    background: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.notification-content p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 5px;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-light);
}

.notification-mark-read {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-mark-read:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.notification-item:not(.unread) .notification-mark-read {
    opacity: 0.5;
}

.btn-clear-all {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-all:active {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Settings Page */
.settings-content {
    padding: 0 20px 20px;
}

.setting-select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-white);
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

.setting-select:focus {
    border-color: var(--primary-color);
}

.btn-setting-action {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-setting-action:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.btn-setting-link {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
}

/* Support Page */
.support-content {
    padding: 0 20px 20px;
}

.support-section {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.support-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* Help Cards */
.help-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.help-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.help-card:active {
    transform: scale(0.95);
    background: var(--primary-color);
    color: white;
}

.help-card:active .help-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.help-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.help-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.help-card:active h3 {
    color: white;
}

.help-card p {
    font-size: 12px;
    color: var(--text-light);
}

.help-card:active p {
    color: rgba(255, 255, 255, 0.9);
}

/* FAQ */
.faq-list {
    margin-top: 10px;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    flex: 1;
}

.faq-question i {
    color: var(--text-light);
    font-size: 12px;
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 10px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    padding-right: 20px;
}

/* Contact Methods */
.contact-methods {
    margin-top: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
}

.contact-item:active {
    transform: scale(0.98);
    background: var(--primary-color);
    color: white;
}

.contact-item:active .contact-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-dark);
}

.contact-item:active .contact-info h3 {
    color: white;
}

.contact-info p {
    font-size: 13px;
    color: var(--text-light);
}

.contact-item:active .contact-info p {
    color: rgba(255, 255, 255, 0.9);
}

.contact-item i.fa-chevron-right {
    color: var(--text-light);
    font-size: 14px;
}

.contact-item:active i.fa-chevron-right {
    color: white;
}

/* Support Form */
.support-form {
    margin-top: 15px;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--primary-color);
}

.support-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: vertical;
}

.support-form textarea:focus {
    border-color: var(--primary-color);
}

.support-form textarea::placeholder {
    color: var(--text-light);
}

/* Dark theme specific adjustments */
body.dark-theme .order-status.pending {
    background: #4a3a1f;
    color: #ffc107;
}

body.dark-theme .order-status.shipped {
    background: #1a3a5a;
    color: #64b5f6;
}

body.dark-theme .order-status.delivered {
    background: #1a3a2a;
    color: #81c784;
}

body.dark-theme .order-status.cancelled {
    background: #4a1a1a;
    color: #e57373;
}

body.dark-theme .btn-order-track {
    background: #1976d2;
}

body.dark-theme .notification-item.unread {
    background: #1a3a5a;
    border-left-color: var(--primary-color);
}

body.dark-theme .notification-item {
    background: #2d2d2d;
}

body.dark-theme .notification-item .notification-icon {
    background: var(--primary-color);
}

body.dark-theme .btn-edit-address:hover {
    background: #1a3a5a;
    color: #64b5f6;
}

body.dark-theme .btn-delete-address:hover {
    background: #4a1a1a;
    color: #e57373;
}

body.dark-theme .help-card {
    background: #2d2d2d;
}

body.dark-theme .help-card:active {
    background: var(--primary-color);
}

body.dark-theme .contact-item {
    background: #2d2d2d;
}

body.dark-theme .contact-item:active {
    background: var(--primary-color);
}

body.dark-theme .faq-answer p {
    color: var(--text-light);
}

body.dark-theme .toggle-slider {
    background-color: #555;
}

body.dark-theme .toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: var(--bg-white);
    color: var(--text-dark);
    border-color: var(--border-color);
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: var(--text-light);
}

body.dark-theme .empty-state {
    color: var(--text-light);
}

body.dark-theme .empty-state i {
    color: var(--border-color);
}

body.dark-theme .cart-empty {
    color: var(--text-light);
}

body.dark-theme .cart-empty i {
    color: var(--border-color);
}

body.dark-theme .btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-theme .btn-outline:active {
    background: white;
    color: var(--primary-color);
}

body.dark-theme .overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-theme .modal-content {
    background: var(--bg-white);
}

body.dark-theme .modal-header {
    background: var(--bg-white);
    border-bottom-color: var(--border-color);
}

body.dark-theme .modal-close {
    background: var(--bg-light);
    color: var(--text-dark);
}

body.dark-theme .modal-close:hover {
    background: var(--border-color);
}

body.dark-theme .sidebar {
    background: var(--bg-white);
}

body.dark-theme .sidebar-header {
    border-bottom-color: var(--border-color);
}

body.dark-theme .cart-sidebar {
    background: var(--bg-white);
}

body.dark-theme .cart-header {
    border-bottom-color: var(--border-color);
}

body.dark-theme .cart-footer {
    background: var(--bg-light);
    border-top-color: var(--border-color);
}

body.dark-theme .cart-item {
    background: var(--bg-light);
}

body.dark-theme .cart-quantity-btn {
    background: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-dark);
}

body.dark-theme .cart-quantity-btn:active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

body.dark-theme .bottom-nav {
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Product Page */
.product-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.product-detail-content {
    padding-bottom: 20px;
}

.product-detail-image {
    position: relative;
    width: 100%;
    height: 350px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    z-index: 10;
}

.product-detail-badge.new {
    background: var(--accent-color);
}

.product-detail-info {
    padding: 20px;
    background: var(--bg-white);
}

.product-detail-header {
    margin-bottom: 15px;
}

.product-detail-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.product-detail-brand {
    font-size: 16px;
    color: var(--text-light);
}

.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.product-detail-rating i {
    color: var(--accent-color);
    font-size: 16px;
}

.rating-value {
    font-weight: 600;
    color: var(--text-dark);
}

.rating-count {
    color: var(--text-light);
    font-size: 13px;
}

.product-detail-price-section {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 12px;
}

.product-detail-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.product-detail-price .price-current {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.product-detail-price .price-old {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-save {
    font-size: 13px;
    color: #4caf50;
    font-weight: 500;
}

.product-detail-description {
    margin-bottom: 25px;
}

.product-detail-description h3,
.product-detail-specs h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.product-detail-description p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

.product-detail-specs {
    margin-bottom: 25px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-size: 14px;
    color: var(--text-light);
}

.spec-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.product-detail-actions {
    position: sticky;
    bottom: 80px;
    margin-top: 20px;
    padding-top: 15px;
    background: var(--bg-white);
}

.btn-add-cart-large {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-cart-large i {
    font-size: 18px;
}

/* Dark theme for product page */
body.dark-theme .product-page-header {
    background: var(--bg-white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

body.dark-theme .product-detail-image {
    background: var(--bg-light);
}

body.dark-theme .product-detail-info {
    background: var(--bg-white);
}

body.dark-theme .product-detail-price-section {
    background: var(--bg-light);
}

body.dark-theme .spec-item {
    border-bottom-color: var(--border-color);
}

body.dark-theme .product-detail-actions {
    background: var(--bg-white);
}

/* Custom Modal (Alert & Confirm) */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-modal.active {
    display: flex;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.custom-modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 20px;
    padding: 30px 25px;
    max-width: 400px;
    max-height: 90vh;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Модальное окно с деталями заказа - больше по размеру */
.custom-modal-content:has(.order-detail) {
    max-width: 650px;
    max-height: 90vh;
    padding: 25px;
}

/* Скрываем иконку и заголовок при показе деталей заказа */
.custom-modal-content:has(.order-detail) .custom-modal-icon,
.custom-modal-content:has(.order-detail) .custom-modal-title {
    display: none;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: rgba(255, 107, 157, 0.1);
    color: var(--primary-color);
}

.custom-modal-icon.confirm {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.custom-modal-icon i.fa-check-circle {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.custom-modal-icon i.fa-exclamation-triangle {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.custom-modal-icon i.fa-times-circle {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.custom-modal-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.custom-modal-message {
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 25px;
    word-wrap: break-word;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Когда в сообщении есть order-detail, убираем центрирование */
.custom-modal-message:has(.order-detail) {
    text-align: left;
    padding: 0;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 157, 0.3) transparent;
}

.custom-modal-message:has(.order-detail)::-webkit-scrollbar {
    width: 6px;
}

.custom-modal-message:has(.order-detail)::-webkit-scrollbar-track {
    background: transparent;
}

.custom-modal-message:has(.order-detail)::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 157, 0.3);
    border-radius: 3px;
}

.custom-modal-message:has(.order-detail)::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 157, 0.5);
}

.custom-modal-buttons {
    display: flex;
    gap: 10px;
}

/* Alert button - align to right */
#customAlertModal .custom-modal-btn {
    align-self: flex-end;
    padding: 12px 30px;
    min-width: 100px;
    flex: 0 0 auto;
}

.custom-modal-btn {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-modal-btn.btn-primary {
    background: var(--primary-color);
    color: white;
}

.custom-modal-btn.btn-primary:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

.custom-modal-btn.btn-cancel {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.custom-modal-btn.btn-cancel:active {
    background: var(--border-color);
    transform: scale(0.98);
}

/* Dark theme for custom modals */
body.dark-theme .custom-modal-content {
    background: var(--bg-white);
}

body.dark-theme .custom-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-theme .custom-modal-btn.btn-cancel {
    background: var(--bg-light);
    border-color: var(--border-color);
}

/* Order Detail in Modal */
.custom-modal-message .order-detail {
    width: 100%;
}

.custom-modal-message .order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.08) 0%, rgba(255, 107, 157, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 157, 0.15);
    gap: 16px;
}

.custom-modal-message .order-detail-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    letter-spacing: -0.3px;
    flex: 1;
}

.custom-modal-message .order-detail-header .order-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.custom-modal-message .order-detail-info {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.custom-modal-message .order-detail-info p {
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 12px 0;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.custom-modal-message .order-detail-info p:last-child {
    margin-bottom: 0;
}

.custom-modal-message .order-detail-info strong {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 140px;
    flex-shrink: 0;
}

.custom-modal-message .order-detail-items {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.custom-modal-message .order-detail-items h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 18px 0;
    color: var(--text-dark);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: -0.2px;
}

.custom-modal-message .order-detail-items .order-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.custom-modal-message .order-detail-items .order-item:hover {
    background: rgba(255, 107, 157, 0.02);
    margin: 0 -12px;
    padding: 16px 12px;
    border-radius: 8px;
}

.custom-modal-message .order-detail-items .order-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.custom-modal-message .order-detail-items .order-item img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-light);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.custom-modal-message .order-detail-items .order-item-info {
    flex: 1;
    min-width: 0;
}

.custom-modal-message .order-detail-items .order-item-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.custom-modal-message .order-detail-items .order-item-info p {
    font-size: 13px;
    margin: 0;
    color: var(--text-light);
    line-height: 1.5;
}

.custom-modal-message .order-detail-items .order-item-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
    text-align: right;
    min-width: 80px;
}

.custom-modal-message .order-detail-total {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.05) 0%, rgba(255, 107, 157, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 157, 0.15);
}

.custom-modal-message .order-detail-total .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 15px;
    color: var(--text-dark);
}

.custom-modal-message .order-detail-total .total-row:not(.total) {
    font-weight: 500;
}

.custom-modal-message .order-detail-total .total-row.total {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    padding-top: 16px;
    margin-top: 12px;
    border-top: 2px solid rgba(255, 107, 157, 0.2);
    letter-spacing: -0.3px;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    background: var(--bg-light);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.auth-logo i {
    font-size: 28px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.auth-header p {
    font-size: 15px;
    color: var(--text-light);
}

.auth-form {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.auth-form .form-group {
    position: relative;
    margin-bottom: 20px;
}

.auth-form .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.auth-form .form-group input {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-dark);
}

.auth-form .form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.auth-form .form-group input::placeholder {
    color: var(--text-light);
}

.form-icon {
    position: absolute;
    right: 15px;
    top: calc(26px + 8px + 21.5px);
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

.password-toggle {
    position: absolute;
    right: 40px;
    top: calc(26px + 8px + 21.5px);
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-light);
    flex: 1;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: var(--text-light);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 15px;
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-social {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-social:active {
    transform: scale(0.98);
    background: var(--bg-light);
}

.btn-social.google {
    border-color: #db4437;
    color: #db4437;
}

.btn-social.google:active {
    background: rgba(219, 68, 55, 0.1);
}

.btn-social.vk {
    border-color: #4c75a3;
    color: #4c75a3;
}

.btn-social.vk:active {
    background: rgba(76, 117, 163, 0.1);
}

.btn-social i {
    font-size: 18px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dark theme for auth pages */
body.dark-theme .auth-container {
    background: var(--bg-light);
}

body.dark-theme .auth-form .form-group input {
    background: var(--bg-white);
    border-color: var(--border-color);
}

body.dark-theme .btn-social {
    background: var(--bg-white);
    border-color: var(--border-color);
}

body.dark-theme .btn-social:active {
    background: var(--bg-light);
}

/* Legal Pages (Terms & Privacy) */
.legal-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-of-type {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.legal-section p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 12px;
}

.legal-section ul {
    margin: 15px 0;
    padding-left: 25px;
}

.legal-section li {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 8px;
}

.legal-section strong {
    color: var(--text-dark);
    font-weight: 600;
}

.legal-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.legal-footer p {
    font-size: 13px;
    color: var(--text-light);
}

/* Dark theme for legal pages */
body.dark-theme .legal-section {
    border-bottom-color: var(--border-color);
}

body.dark-theme .legal-footer {
    border-top-color: var(--border-color);
}

/* Favorite Icon Active State */
.product-favorite .favorite-active,
.product-favorite.favorite-active i,
.product-favorite i.favorite-active {
    color: #e74c3c !important;
}

/* Category Card Animation */
.category-card-clicked {
    transform: scale(0.95);
    transition: transform 0.15s;
}

/* Cart Button Success State */
.btn-add-cart.success,
.btn-add-cart-large.success {
    background: #4caf50 !important;
}

/* Order Card Hidden */
.order-card-hidden {
    display: none !important;
}

/* Product Card Pointer */
.product-card-clickable {
    cursor: pointer;
}

/* Toast Notifications */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #4caf50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    pointer-events: auto;
    font-size: 14px;
}

.toast.toast-success {
    background: #4caf50;
}

.toast.toast-error {
    background: #f44336;
}

.toast.toast-warning {
    background: #ff9800;
}

.toast.toast-info {
    background: #2196f3;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

.toast-slide-out {
    animation: slideOutRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Checkout Page Styles */
.checkout-content {
    padding: 20px;
    padding-bottom: 100px;
}

.checkout-section {
    background: var(--bg-white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.checkout-section .section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.checkout-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.checkout-section .section-header .section-title {
    margin-bottom: 0;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Checkout Items */
.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
}

.checkout-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.checkout-item-info p {
    font-size: 12px;
    color: var(--text-light);
}

.checkout-item-total {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Address Selection */
.address-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.address-option {
    display: block;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    background: var(--bg-light);
    margin: 0;
}

.address-option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.05);
}

.address-option.selected {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
    margin-top: 10px;
    margin-bottom: 10px;
}

.address-option input[type="radio"] {
    display: none;
}

.address-option-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.address-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.address-option-header i {
    font-size: 20px;
    color: var(--primary-color);
}

.address-option-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.address-option-header p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.address-option-header > div {
    flex: 1;
}

.address-badge {
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.address-text {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    padding-left: 32px;
}

.new-address-form {
    margin-top: 15px;
}

.new-address-form .form-group {
    margin-bottom: 15px;
}

.new-address-form label {
    display: flex;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.new-address-form input[type="text"],
.new-address-form input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-white);
    color: var(--text-dark);
}

.new-address-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Textarea styles for checkout */
.checkout-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-dark);
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

.checkout-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.checkout-section textarea::placeholder {
    color: var(--text-light);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Delivery Methods */
.delivery-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delivery-option {
    display: block;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    background: var(--bg-light);
    margin: 0;
}

.delivery-option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.05);
}

.delivery-option.selected {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
}

.delivery-option input[type="radio"] {
    display: none;
}

.delivery-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.delivery-option-header i {
    font-size: 24px;
    color: var(--primary-color);
}

.delivery-option-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-dark);
}

.delivery-option-header p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

.delivery-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: block;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    background: var(--bg-light);
    margin: 0;
}

.payment-option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.05);
}

.payment-option.selected {
    border-color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-option-content i {
    font-size: 24px;
    color: var(--primary-color);
}

.payment-option-content span {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

/* Checkout Summary */
.checkout-summary {
    position: sticky;
    bottom: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    margin: 20px -20px -20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 16px;
    color: var(--text-dark);
}

.summary-row.total {
    font-size: 20px;
    font-weight: 600;
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
    margin-top: 10px;
    color: var(--primary-color);
}

.btn-submit-order {
    width: 100%;
    padding: 15px;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit-order:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
}

