/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f1f1;
    color: #000;
    line-height: 1.4;
    font-size: 15px;
    padding: 0;
}


#app {
	min-width: 360px;
    max-width: 480px;          
    width: 100%;               
    margin: 0 auto;            
    min-height: 100vh; 
	background: white;     

}

@media (max-width: 359px) {
    #app {
        min-width: 360px;
        overflow-x: auto;
    }
    body {
        min-width: 360px;
        background: #f1f1f1; 
    }
}


@media (min-width: 481px) {
    body {
        background: #e0e0e0;   
        padding: 20px 0;       
    }
    
    #app {
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
}


@media (min-width: 1200px) {
    body {
        padding: 40px 0;      
    }
}

.shop-item, .category-item, .coupon-item,
.shop-page-header, .promo-header,
.promo-description-block, .promo-meta {
    background: white; 
}


.app-header {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
    background: #f1f1f1;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
}

.app-header p {
    font-size: 14px;
    color: #666;
}



.tab-content {
    display: none;
}

.tab-content.active {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-list {
    padding: 0;
	flex: 1;	
}

.shop-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.shop-item:hover {
    background: #f1f1f1;
    border-bottom-color: #f1f1f1; 
}


.shop-details {
    flex: 1;
    min-width: 0;
}

.shop-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.shop-category {
    font-size: 14px;
    color: #6B7280;
}


.categories-list {
    padding: 0;
	flex: 1;
}

.category-item {
    display: block;
    padding: 16px 25px;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    font-size: 16px;
    color: #000;
}

.category-item:hover {
    background: #f1f1f1; 
    border-bottom-color: #f1f1f1;
}


.category-page-header {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    background: #f1f1f1;
    position: sticky;
    top: 0;
    z-index: 50;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: #14aff0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}


.shop-page-header {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    background: #f1f1f1;
}

.shop-header-content {
    display: flex;
    flex-direction: column; 
    gap: 16px; 
}

.shop-header-left {
    display: flex;
    align-items: center;
    gap: 12px; 
    width: 100%; 
}

.shop-button-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.shop-name-large {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.goto-button {
    padding: 10px 20px;
    background: #14aff0;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
}


.goto-button:hover {
    background: #0d8fd8;
}


.shop-description {
    font-size: 15px;
    color: #374151;
    line-height: 1.5;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #F3F4F6;
}


.coupon-section {
    padding: 16px;
	background: #f8f8f8;
}

.coupon-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: #6B7280;
    margin-bottom: 16px;
}

.coupon-item {
    display: block;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
    background: white;
    transition: all 0.2s;
	cursor: pointer;
}

.coupon-item:hover {
    border-color: #14aff0;
    background: #f9f9f9; 
    box-shadow: 0 2px 8px rgba(20, 175, 240, 0.1);
}

.coupon-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
}

.coupon-excerpt {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.details-button {
    display: inline-block;
    padding: 8px 16px;
    background: #14aff0;
    color: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.details-button:hover {
    background: #0d8fd8;
}


.promo-header {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    background: #f1f1f1;
}

.promo-shop-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.promo-shop-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-shop-name {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.promo-title-block {
    margin: 25px;
}

.promo-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
}

.promo-description-block {
    margin: 0 16px 24px;
    padding: 16px;
    background: white;
    border-radius: 12px;
}

.promo-description-block h3 {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
}

.promo-description {
    font-size: 15px;
    color: #374151;
    line-height: 1.5;
}

.promo-code-block {
    margin: 0 16px 24px;
    padding: 20px;
    background: #f1f1f1;
    border-radius: 12px;
    color: black;
    text-align: center;
}

.promo-code-label {
    font-size: 14px;
    color: black; 
    margin-bottom: 8px;
}

.promo-code {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
	word-break: break-word;
}

.copy-goto-button {
    display: block;
    width: 100%;
    padding: 18px;
    background: #14aff0;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
}

.copy-goto-button:hover {
    background: #0d8fd8;
    transform: translateY(-2px);
}

.promo-meta {
    margin: 0 16px 24px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    color: #6B7280;
}

.promo-meta div {
    margin-bottom: 8px;
}

.page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
	background: #f8f8f8;
}


.hidden {
    display: none !important;
}

.empty-state {
    padding: 40px 16px;
    text-align: center;
    color: #6B7280;
}


@media (max-width: 480px) {
    .promo-code {
        font-size: 28px;
    }
 

}

.shop-logo {
    width: 100px;
    height: 41px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.shop-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}


.tabs {
    display: flex;
    background: #f8f9fa; 
    padding: 16px 8px;
    gap: 8px;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    
  
    background: #ffffff;
    color: #14aff0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08); 
}

.tab-btn.active {
    background: #f8f9fa; 
    color: #14aff0; 
    font-weight: 700;
    border: 1px solid #14aff0; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); 
    transform: translateY(2px); 
}


.tab-btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}


.tab-btn:hover:not(.active) {
    border-color: #b3d9ff; 
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.shop-category-small {
    font-size: 13px;
    color: #6B7280; /* Серый цвет */
    margin-top: 2px;
    font-weight: 400;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #14aff0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-box {
    padding: 16px;
    background: white;
    border-bottom: 1px solid #E5E7EB;
    max-width: 480px; 
    margin: 0 auto;   
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%; 
    transform: translateY(-50%); 
    color: #999;
    font-size: 16px;
    z-index: 2; 
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    font-size: 16px;
    background: #F9FAFB;
    box-sizing: border-box; 
}

.search-input:focus {
    outline: none;
    border-color: #14aff0;
    background: white;
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%; 
    transform: translateY(-50%); 
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    z-index: 2; 
}

.clear-search-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.error-state {
    padding: 40px 20px;
    text-align: center;
    color: #dc3545;
}

.error-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #dc3545;
}

.error-state button {
    margin-top: 16px;
    padding: 10px 20px;
    background: #14aff0;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ccc;
}
.site-header {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.site-header-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    min-height: 60px;
    background: white;
}

.site-header-back {
    background: none;
    border: none;
    font-size: 24px;
    padding: 8px 12px 8px 0;
    cursor: pointer;
    color: #14aff0;
    display: flex;
    align-items: center;
}

.site-header-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

/* В Telegram скрываем */
body.telegram-platform .site-header {
    display: none;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    width: 128px;
    height: 128px;
    margin-bottom: 20px;
    border-radius: 16px;
}

.preloader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #14aff0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.preloader-text {
    color: #666;
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.shop-item, .category-item, .coupon-item {
    cursor: pointer;
}
.emoji {
    display: inline-block;
    font-style: normal; 
    font-size: 16px;
    margin-right: 6px;
}

.search-container .emoji.search {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0;
    pointer-events: none;
}