* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
html {
    overflow-x: hidden;
    max-width: 100vw;
}
:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: rgba(30, 30, 30, 0.9);
    --bg-card: rgba(42, 42, 42, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ffffff;
    --accent-hover: #e5e5e5;
    --border: rgba(58, 58, 58, 0.8);
    --shadow: rgba(0, 0, 0, 0.5);
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding-bottom: 0;
    user-select: none;
    margin: 0;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
}
#app {
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 100px;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}
.screen {
    display: none;
    animation: fadeIn 0.3s;
}
.screen.active {
    display: block;
}
@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes borderGlow {
    0% {
        border-color: transparent;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
    100% {
        border-color: #ffffff;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
    }
}
.screen-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}
.logo:hover {
    transform: scale(1.05);
}
.search-container {
    margin-bottom: 20px;
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.search-input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    min-width: 0;
}
.search-input::placeholder {
    color: var(--text-secondary);
}
.search-input:focus {
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
.discounts-btn {
    width: 100%;
    padding: 16px 20px;
    background: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.discounts-btn:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
    transform: scale(1.02);
}
.discounts-btn:active {
    transform: scale(0.98);
}
.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}
.catalog-list-item {
    background: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    font-family: inherit;
    width: 100%;
    text-align: left;
}
.catalog-list-item:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
    transform: translateY(-2px);
}
.catalog-list-item:active {
    transform: translateY(-1px);
}
.catalog-item-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    flex: 1;
}
.catalog-arrow {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-left: 10px;
}
.catalog-list-item:hover .catalog-arrow {
    transform: translateX(4px);
    color: var(--accent);
}
.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    animation: borderGlow 0.3s ease forwards;
}
.category-header .screen-title {
    margin: 0;
    flex: 1;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
    border-color: var(--accent);
}
.product-card:active {
    transform: translateY(-1px);
}
.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    position: relative;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-image-container {
    position: relative;
    width: 100%;
}
.product-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
}
.product-image-container:hover .product-nav-btn {
    opacity: 1;
    visibility: visible;
}
.product-nav-btn:focus {
    outline: none;
}
.product-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}
.product-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(0, 0, 0, 0.9);
}
.product-nav-prev {
    left: 8px;
}
.product-nav-next {
    right: 8px;
}
.product-photo-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 11;
}
.product-content {
    padding: 12px;
}
.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-description {
    display: none;
}
.product-price {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
}
.product-stock {
    font-size: 13px;
    color: #10b981;
    margin-bottom: 10px;
    font-weight: 500;
}
.product-discount {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    z-index: 11;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}
.product-new {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    z-index: 11;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}
.product-price-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.product-price {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
}
.product-price.discounted {
    color: #ef4444;
}
.product-price-original {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: line-through;
    font-weight: 500;
}
.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.add-to-cart-btn:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
    transform: scale(1.02);
}
.add-to-cart-btn:active {
    transform: scale(0.98);
}
.add-to-cart-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.add-to-cart-btn:active::after {
    width: 300px;
    height: 300px;
}
.cart-list {
    margin-bottom: 20px;
}
.cart-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.cart-item:hover {
    background: var(--bg-secondary);
}
.cart-item-info {
    flex: 1;
}
.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}
.cart-item-price {
    color: var(--text-secondary);
    font-size: 15px;
}
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-btn {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.cart-btn:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
}
.cart-btn:active {
    transform: scale(0.9);
}
.cart-quantity {
    font-size: 18px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}
.cart-total {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow);
}
.cart-total-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.order-btn {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.order-btn:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
    transform: scale(1.02);
}
.order-btn:active {
    transform: scale(0.98);
}
.order-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.total-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}
.total-price {
    font-size: 28px;
    color: var(--text-primary);
    font-weight: 700;
}
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    display: flex;
    justify-content: space-around;
    padding: 8px;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 20px;
    min-width: 70px;
    backdrop-filter: blur(10px);
}
.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}
.nav-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}
.nav-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.nav-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0.7);
    transition: all 0.3s ease;
}
.nav-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-btn:hover .nav-icon {
    filter: brightness(0.9);
    transform: scale(1.1);
}
.nav-btn.active .nav-icon {
    filter: brightness(1);
    transform: scale(1.05);
}
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    border-radius: 8px;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}
.admin-info {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(240, 240, 240, 0.1));
    border: 1px solid var(--accent);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
}
.admin-welcome {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}
.admin-warning {
    font-size: 13px;
    color: var(--text-secondary);
}
.admin-actions {
    margin-bottom: 25px;
}
.admin-btn {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}
.admin-btn:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
    transform: scale(1.02);
}
.admin-btn:active {
    transform: scale(0.98);
}
.admin-btn-cancel {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    border: 2px solid transparent;
    border-radius: 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.admin-btn-cancel:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
}
.admin-btn-cancel:active {
    transform: scale(0.98);
}
.add-product-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 25px;
}
.add-product-form h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}
.admin-input,
.admin-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    margin-bottom: 12px;
    outline: none;
    transition: all 0.2s;
}
.admin-input:focus,
.admin-textarea:focus {
    border-color: var(--accent);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
.admin-input:hover,
.admin-textarea:hover {
    border-color: var(--accent);
}
.admin-input option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px;
}
.admin-input option:hover {
    background: var(--accent);
    color: #000000;
}
.admin-textarea {
    min-height: 100px;
    resize: vertical;
}
.admin-form-buttons {
    display: grid;
    gap: 10px;
}
.admin-products {
    display: grid;
    gap: 12px;
}
.admin-product-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s;
}
.admin-product-item:hover {
    background: var(--bg-secondary);
}
.admin-product-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.admin-product-image-small {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.admin-product-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-product-placeholder {
    font-size: 24px;
    color: var(--border);
}
.admin-product-name {
    flex: 1;
    font-weight: bold;
    text-transform: uppercase;
}
.admin-product-price {
    color: var(--accent);
    font-weight: bold;
}
.admin-product-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.admin-edit-btn,
.admin-delete-btn {
    padding: 11px 16px;
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.admin-edit-btn {
    background: #1a1a1a;
}
.admin-edit-btn:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
}
.admin-delete-btn {
    background: #dc2626;
    border-color: #dc2626;
}
.admin-delete-btn:hover {
    background: #b91c1c;
    animation: borderGlow 0.3s ease forwards;
}
.admin-edit-btn:active,
.admin-delete-btn:active {
    transform: scale(0.95);
}
.admin-product-actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6px;
    margin-top: 8px;
}
.admin-product-actions .admin-edit-btn,
.admin-product-actions .admin-delete-btn {
    padding: 8px 4px;
    font-size: 11px;
}
.edit-product-form {
    margin-bottom: 20px;
}
.edit-product-form .admin-input,
.edit-product-form .admin-textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 10px;
    outline: none;
}
.edit-product-form .admin-input:focus,
.edit-product-form .admin-textarea:focus {
    border-color: var(--accent);
}
.edit-product-form .admin-textarea {
    min-height: 80px;
    resize: vertical;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: fadeIn 0.2s;
}
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1001;
}
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.modal-text {
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.modal-btn {
    padding: 14px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-btn-primary {
    background: #1a1a1a;
    color: var(--text-primary);
}
.modal-btn-primary:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
    transform: scale(1.02);
}
.modal-btn-secondary {
    background: #1a1a1a;
    color: var(--text-primary);
}
.modal-btn-secondary:hover {
    background: #2a2a2a;
    animation: borderGlow 0.3s ease forwards;
}
.image-upload-container {
    margin-bottom: 16px;
}
.image-upload-label {
    display: block;
    width: 100%;
    padding: 50px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.image-upload-label:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}
.image-upload-label.has-image {
    padding: 0;
    border-style: solid;
    border-color: var(--accent);
}
.image-upload-input {
    display: none;
}
.image-upload-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.image-preview {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: none;
    border-radius: 14px;
}
.image-preview.active {
    display: block;
}
.image-previews-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px;
    width: 100%;
}
.image-previews-container.active {
    display: grid;
}
.image-preview-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-secondary);
}
.image-preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.image-preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}
.image-remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.image-remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}
.image-upload-label.has-image .image-remove-btn {
    display: flex;
}
.toast {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 24px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s;
    min-width: 250px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.success {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
}
.toast.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
}
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
.cart-badge.bounce {
    animation: cartBounce 0.3s;
}
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.4);
    }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    color: transparent;
}
.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.product-detail-content {
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border-radius: 16px;
}
.product-detail-gallery {
    width: 100%;
}
.product-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
}
.gallery-thumb {
    width: 100%;
    padding-top: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.gallery-thumb:hover {
    border-color: var(--accent);
}
.gallery-thumb.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.gallery-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    z-index: 1002;
}
.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}
.product-detail-image {
    width: 100%;
    height: 280px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    margin: 0;
}
.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-detail-info {
    padding: 20px;
}
.product-detail-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.product-detail-category {
    display: inline-block;
    padding: 5px 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.product-detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}
.product-detail-description {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    html {
        overflow-x: hidden;
        width: 100%;
    }
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    #app {
        padding: 12px;
        padding-bottom: 85px;
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .screen-title {
        font-size: 22px;
        margin-bottom: 16px;
    }
    .logo {
        width: 60px;
        height: 60px;
    }
    .logo-container {
        margin-bottom: 16px;
    }
    .loading-title {
        font-size: 24px;
        letter-spacing: 1px;
    }
    .search-container {
        margin-bottom: 16px;
        width: 100%;
        max-width: 100%;
    }
    .search-input {
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 14px;
    }
    .discounts-btn {
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    .catalog-grid {
        gap: 12px;
        padding: 5px 0;
    }
    .catalog-list {
        gap: 10px;
        padding: 5px 0;
    }
    .catalog-list-item {
        padding: 14px 16px;
        border-radius: 14px;
    }
    .catalog-item-text {
        font-size: 14px;
    }
    .catalog-arrow {
        font-size: 20px;
    }
    .category-header {
        gap: 10px;
        margin-bottom: 15px;
    }
    .back-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 10px;
    }
    .category-header .screen-title {
        font-size: 20px;
    }
    .products-grid {
        gap: 8px;
        width: 100%;
        max-width: 100%;
    }
    .product-card {
        border-radius: 12px;
        max-width: 100%;
    }
    .product-image {
        height: 160px;
        font-size: 40px;
    }
    .product-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    @media (hover: none) and (pointer: coarse) {
        .product-nav-btn {
            opacity: 1;
            visibility: visible;
        }
    }
    .product-nav-prev {
        left: 6px;
    }
    .product-nav-next {
        right: 6px;
    }
    .product-content {
        padding: 8px;
    }
    .product-name {
        font-size: 13px;
        margin-bottom: 4px;
    }
    .product-price {
        font-size: 15px;
        margin-bottom: 4px;
    }
    .product-stock {
        font-size: 11px;
        margin-bottom: 6px;
    }
    .add-to-cart-btn {
        padding: 7px;
        font-size: 11px;
        border-radius: 8px;
    }
    .cart-item {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    .cart-item-name {
        font-size: 14px;
    }
    .cart-item-price {
        font-size: 13px;
    }
    .cart-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
        background: #1a1a1a;
        border: 2px solid transparent;
    }
    .cart-btn:hover {
        background: #2a2a2a;
        animation: borderGlow 0.3s ease forwards;
    }
    .cart-total {
        padding: 16px;
        border-radius: 16px;
    }
    .total-label {
        font-size: 15px;
    }
    .total-price {
        font-size: 22px;
    }
    .order-btn {
        padding: 12px;
        font-size: 13px;
    }
    .bottom-nav {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 6px;
        border-radius: 22px;
    }
    .nav-btn {
        padding: 10px 12px;
        min-width: 60px;
        border-radius: 18px;
    }
    .nav-label {
        font-size: 10px;
    }
    .nav-icon {
        width: 20px;
        height: 20px;
    }
    .cart-badge {
        top: -4px;
        right: -4px;
        min-width: 12px;
        height: 12px;
        font-size: 8px;
        border-radius: 6px;
    }
    .product-detail-content {
        max-width: 100%;
        margin: 0 10px;
    }
    .product-detail-image {
        height: 200px;
        border-radius: 12px;
    }
    .product-detail-info {
        padding: 14px;
    }
    .product-detail-name {
        font-size: 17px;
        margin-bottom: 8px;
    }
    .product-detail-category {
        font-size: 11px;
        padding: 4px 8px;
        margin-bottom: 10px;
    }
    .product-detail-price {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .product-detail-description {
        font-size: 13px;
        margin-bottom: 16px;
    }
    .admin-product-actions .admin-edit-btn,
    .admin-product-actions .admin-delete-btn {
        padding: 6px 2px;
        font-size: 9px;
    }
    .admin-product-actions {
        grid-template-columns: 1.2fr 1fr;
    }
    .filters-dropdown {
        right: 12px;
        top: 65px;
        min-width: 180px;
    }
    .image-preview {
        max-height: 220px;
    }
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
    }
}
