/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ===== LAYOUT ===== */
#pagewrap {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    min-height: 100vh;
}

#page {
    width: 100%;
    padding: 0;
}

/* ===== HEADER ===== */
#header {
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.header-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
}

.header-slide.active {
    opacity: 1;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

/* ===== TOP MENU ===== */
ul#tmenu {
    list-style: none;
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 3;
}

ul#tmenu li {
    margin: 0;
}

.language-dropdown select {
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
}

/* ===== CART ===== */
.cart {
    position: relative;
    margin-left: 20px;
}

.cart-icon-container {
    position: relative;
    background: rgba(255,255,255,0.9);
    padding: 8px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-icon-container:hover {
    background: white;
    transform: scale(1.1);
}

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

.cart-quantity {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* ===== SIDEBAR ===== */
#sidebar {
    float: left;
    width: 280px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    min-height: 100vh;
    padding: 20px 0;
}

#logowrap {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

#logo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ===== MAIN MENU ===== */
#menu {
    margin-bottom: 30px;
}

#menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#menu ul li {
    margin: 0;
    padding: 0;
}

#menu ul li a {
    display: block;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 16px;
}

#menu ul li a:hover {
    background: rgba(255,255,255,0.1);
    border-left: 4px solid #e74c3c;
    padding-left: 40px;
}

/* ===== CURRENCY FORM ===== */
#currency-form {
    padding: 0 30px;
    margin-bottom: 30px;
}

#currency-form label {
    display: block;
    margin-bottom: 8px;
    color: #ecf0f1;
    font-size: 14px;
}

#currency-form select {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    background: white;
    margin-bottom: 10px;
}

#currency-form button {
    width: 100%;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#currency-form button:hover {
    background: #c0392b;
}

/* ===== CATEGORIES ===== */
#lblock {
    padding: 0 30px;
}

.categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories ul li {
    margin-bottom: 10px;
}

.categories ul li a {
    display: block;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.categories ul li a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

/* ===== CONTENT AREA ===== */
#contentwrap {
    float: right;
    width: calc(100% - 280px);
    background: white;
    min-height: 100vh;
}

#body_area {
    padding: 30px;
}

/* ===== SEARCH ===== */
.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.search-input-container {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.search-button {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* ===== PRODUCTS ===== */
.product-area {
    margin-top: 30px;
}

.new-arrivals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

.product:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product:hover .product-image {
    transform: scale(1.1);
}

.favorite {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite:hover {
    transform: scale(1.2);
}

.product h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.4;
}

.product p {
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.product .button {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.product .button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 12px 18px;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.pagination a:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* ===== FORMS ===== */
form {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input:focus,
select:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

button[type="submit"] {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

/* ===== SUBCATEGORIES ===== */
.subcategories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.subcategories a {
    display: block;
    padding: 12px 15px;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.subcategories a:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* ===== MESSAGES ===== */
.success-message {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.error-message {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ===== NO FAVORITES ===== */
.no-favorites {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-favorites p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* ===== PRODUCT POPUP ===== */
.product-image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.product-image-popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== MODERN FOOTER STYLES ===== */
#modern-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 50px;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    color: #ecf0f1;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Логотип и описание */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    border-radius: 50%;
    border: 2px solid #e74c3c;
}

.footer-logo h3 {
    color: #ecf0f1;
    font-size: 20px;
    font-weight: 600;
}

.footer-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Социальные сети */
.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.social-link:hover {
    background: #e74c3c;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* Ссылки */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #e74c3c;
    transform: translateX(5px);
}

.footer-links i {
    font-size: 12px;
    color: #e74c3c;
}

/* Контактная информация */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #bdc3c7;
    font-size: 14px;
}

.contact-item i {
    color: #e74c3c;
    width: 20px;
    text-align: center;
}

/* Форма рассылки */
.newsletter-text {
    color: #bdc3c7;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.input-group {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
}

.input-group input::placeholder {
    color: #95a5a6;
}

.input-group input:focus {
    outline: none;
    background: rgba(255,255,255,0.05);
}

.input-group button {
    padding: 12px 20px;
    background: #e74c3c;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-group button:hover {
    background: #c0392b;
}

/* Способы оплаты */
.payment-methods {
    margin-top: 25px;
}

.payment-methods h5 {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 16px;
}

.payment-icons {
    display: flex;
    gap: 15px;
}

.payment-icons i {
    font-size: 24px;
    color: #bdc3c7;
    transition: all 0.3s ease;
}

.payment-icons i:hover {
    color: #e74c3c;
    transform: scale(1.2);
}

/* Социальные кнопки и счетчики */
.footer-social-section {
    background: rgba(0,0,0,0.1);
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-social-section .social-share {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-social-section .counter-section {
    text-align: center;
    margin-top: 15px;
}

/* Нижняя часть футера */
.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 20px 0;
}

.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright p {
    color: #95a5a6;
    font-size: 14px;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #e74c3c;
}

/* Кнопка "Наверх" */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
}

#back-to-top.show {
    display: flex;
}
