/* ===== EXISTING STYLES (твои старые стили) ===== */
body {
  background-color: white;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  background-size: cover;
  height: 100%;
  margin: 0;
}

.dropdown-toggle::after {
  content: none;
}

.custom-shadow {
  box-shadow: 5px 5px 25px 19px #000000;
}

.product_id {
  color: gray;
  font-size: 15px;
}

.badge.bg-warning.text-dark {
  position: absolute;
  top: 10px;
  right: 5px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 1rem;
  box-shadow: 2px 2px 15px 9px #000000;
}

.badge-banner {
  top: 80%;
  border-radius: 15px;
  font-size: 0.7rem;
}

/* ===== NEW TREASURE CHEST HEADER STYLES ===== */

/* Top contact bar */
.top-bar {
    background: white 100%;
    padding: 8px 29px;
    border-bottom: 2px solid #ffd700;
    position: relative;
    z-index: 1001;
    width: 100%;/* Ширина = 100% экрана минус 20px */
    margin-left: auto;
    margin-right: auto;
}



.top-bar-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-right: auto;
}

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

.contact-item i {
    color: #97bc62;
}

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    position: static;
}


.user-actions .dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
    top: 100% !important;
    margin-top: 5px;
}

.dropdown-menu.show {
    display: block !important;
    z-index: 1050 !important;
}


.action-btn {
    background: #97bc62 !important;
    color: white !important;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    background: #7da050 !important;
    transform: translateY(-2px);
    color: white !important;
}

/* Main header */
.main-header {
    background: white;
    padding: 15px 29px;
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(10px);
    width: 100%; /* Ширина = 100% экрана минус 20px */

}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.corn-logo {
    width: 90px;
    height: 60px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.brand-name {
    font-size: 33px;
    font-weight: bold;
    background: linear-gradient(135deg, #ffd700, #97bc62);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-family: 'Arial Black', sans-serif;
    display: inline-block;
    transition: transform 0.3s;
}

.brand-name:hover {
    transform: scale(1.05);
    text-decoration: none;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-link-custom {
    color: #2c5f2d !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    position: relative;
    transition: color 0.3s;
}

.nav-link-custom:hover {
    color: #97bc62 !important;
    text-decoration: none;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s;
}

.nav-link-custom:hover::after {
    width: 100%;
}

/* Search bar */
.search-section {
    display: flex;
    width: 460px;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
    width: 90%;
    align-items: center;
    background: rgba(245, 245, 245, 0.9);
    border-radius: 25px;
    padding: 8px 20px;
    min-width: 250px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 2px solid #e0e0e0; /* Добавляем прозрачную рамку по умолчанию */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-bar input {
    border: #97bc62;
    background: none;
    outline: none;
    width: 100%;
    padding: 0 10px;
    font-size: 14px;
}

.search-bar:focus-within {
    border-color: #97bc62; /* Меняем цвет рамки на твой фирменный зеленый */
}

.search-bar input::placeholder {
    color: black;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

.search-btn:hover {
    color: #97bc62;
}

.cart-wrapper-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #2c5f2d;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-wrapper-btn:hover {
    transform: scale(1.1);
}

.cart-wrapper-btn .cart-icon {
    font-size: 26px;
    color: #2c5f2d;
    transition: color 0.3s;
}

.cart-wrapper-btn:hover .cart-icon {
    color: #97bc62;
}

/* Счетчик товаров */
.cart-wrapper-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    padding: 0 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Анимация пульсации для счетчика */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.cart-wrapper-btn .cart-count {
    animation: pulse 2s infinite;
}

/* Убираем стандартные стили кнопки при фокусе */
.cart-wrapper-btn:focus {
    outline: none;
    box-shadow: none;
}

/* При нулевом количестве товаров */
.cart-wrapper-btn .cart-count:empty,
.cart-wrapper-btn .cart-count:contains("0") {
    background: #999;
}

/* Catalog button */
.catalog-btn {
    background: linear-gradient(135deg, #97bc62, #7da050) !important;
    color: white !important;
    padding: 10px 25px;
    border-radius: 25px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 16px;
}

.catalog-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(151, 188, 98, 0.4);
    color: white !important;
}

/* Dropdown styling - переопределяем Bootstrap */
.header-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-top: 10px;
    padding: 5px 0;
    background: white;
    z-index: 1050 !important;  /* Выше чем у хедера */
    position: absolute !important;
    top: 100% !important;
}

.header-dropdown .dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s;
    color: #333;
}

.header-dropdown .dropdown-item:hover {
    background: #f8f4e6;
    color: #2c5f2d;
    padding-left: 25px;
}

.header-dropdown .dropdown-item i {
    margin-right: 8px;
    color: #97bc62;
}

.dropdown-divider {
    margin: 5px 0;
    border-color: #e0e0e0;
}

/* Fixed catalog button override */
.fixed-catalog {
    position: fixed !important;
    top: 100px;
    left: 20px;
    z-index: 999;
}

/* Content spacing */
.main-content {
    padding-top: 20px;
}

/* Mobile responsiveness */
@media (max-width: 991px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .search-section {
        order: 2;
    }

    .top-bar-content {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
    }

    .brand-name {
        font-size: 24px;
    }

    .corn-logo {
        width: 45px;
        height: 45px;
    }

    .search-bar {
        min-width: 200px;
    }

    .main-nav {
        gap: 15px;
    }

    .nav-link-custom {
        font-size: 14px;
    }

    .fixed-catalog {
        position: static !important;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .brand-name {
        font-size: 20px;
    }

    .corn-logo {
        width: 35px;
        height: 35px;
    }

    .catalog-btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .action-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .contact-item {
        font-size: 12px;
    }

    .search-bar {
        min-width: 150px;
        padding: 6px 15px;
    }
}

/* Animation on load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-header {
    animation: fadeIn 0.5s ease;
}

/* Loading animation for cart count */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.cart-count {
    animation: pulse 2s infinite;
}


/* included_cart css */
/* --- Стили для ПОЛНОЦЕННОЙ страницы корзины --- */
.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
}
.item-details { flex-grow: 1; }
.item-details a { text-decoration: none; color: #333; }
.item-details a:hover .item-title { color: #000; }
.item-title { margin: 0; font-size: 1.1rem; font-weight: 600; }
.item-price-per-unit { margin: 5px 0 0 0; color: #777; font-size: 0.9rem; }
.item-quantity { width: 120px; margin: 0 20px; }
.item-quantity .input-group { max-width: 120px; }
.item-total-price { width: 100px; text-align: right; font-size: 1.1rem; }
.item-remove { width: 50px; text-align: right; }
.item-remove a { font-size: 1.8rem; color: #aaa; text-decoration: none; transition: color 0.2s ease; }
.item-remove a:hover { color: #e55555; }

.cart-summary { background-color: #f9f9f9; padding: 25px; border-radius: 12px; border: 1px solid #eee; }
.cart-summary h4 { font-weight: 600; margin-bottom: 20px; }
.summary-row, .summary-total { display: flex; justify-content: space-between; margin-bottom: 15px; color: #555; }
.summary-total { font-size: 1.2rem; font-weight: bold; color: #333; margin-top: 15px; }
.cart-summary .btn-dark { padding: 12px; font-size: 1.1rem; font-weight: 600; }

.cart-empty { text-align: center; padding: 80px 20px; background-color: #f9f9f9; border-radius: 12px; }