/* Header Styles */
.shop-header {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

/* Top banner */
.promo-banner {
    background: #000;
    color: white;
    font-size: 14px;
    padding: 8px 0;
    text-align: center;
    position: relative;
}

.promo-banner .close-banner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-banner .close-banner:hover {
    opacity: 0.7;
}

.promo-link {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.promo-link:hover {
    color: #007bff;
}

/* Main header */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shop-logo {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    letter-spacing: -1px;
}

.shop-logo:hover {
    color: #007bff;
}

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

.nav-dropdown {
    position: relative;
}

.nav-link-custom {
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-custom:hover {
    border-bottom: #000 solid 2px;
    color: #000;
}

.nav-link-custom .dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Search bar - Updated */
.search-container-custom {
    position: relative;
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-input-custom {
    width: 100%;
    padding: 9px 16px 9px 50px;
    border: 1px solid #e5e5e5;
    border-radius: 62px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #000;
}

.search-input-custom:focus {
    outline: none;
    border-color: #000;
    background: white;
    box-shadow: none;
}

.search-input-custom::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-size: 16px;
}

.search-btn-custom {
    position: absolute;
    left: 16px;
    /* Đặt icon ở bên trái */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn-custom:hover {
    color: #000;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.action-btn:hover {
    background: var(--primary-color-2);
    color: var(--primary-color);
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    padding: 8px;
    cursor: pointer;
}

/* Mobile styles */
@media (max-width: 991.98px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .search-container-custom {
        display: none;
    }

    .header-actions {
        gap: 10px;
    }

    .shop-logo {
        font-size: 24px;
    }
}

@media (max-width: 768px) {

    .promo-banner {
        font-size: 12px;
        padding: 6px 0;
    }

    .shop-logo {
        font-size: 20px;
    }

    .action-btn {
        font-size: 18px;
        padding: 6px;
    }

    .search-container-custom {
        margin: 0 10px;
    }

    .search-input-custom {
        padding: 10px 14px 10px 40px;
        font-size: 14px;
    }

    .search-btn-custom {
        left: 12px;
        font-size: 16px;
    }
}

/* Mobile navigation overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 1050;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav.show {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
}

.mobile-nav-item {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-item:hover {
    color: #007bff;
}

.mobile-search {
    margin-bottom: 20px;
}

.mobile-search .search-input-custom {
    border-radius: 40px;
    padding: 12px 16px 12px 45px;
    border: 1px solid #e5e5e5;
    background: #f0f0f0;
    font-size: 16px;
}

.mobile-search .search-btn-custom {
    left: 14px;
    font-size: 18px;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility classes */
.text-truncate-custom {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shadow-custom {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header Variants */
.minimal-header .main-header {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkout-header .search-container-custom,
.success-header .search-container-custom {
    display: none !important;
}

.success-header {
    background: var(--primary-color-2);
}

.success-header .main-header {
    background: var(--primary-color-2);
}

/* Breadcrumb Section */
.breadcrumb-section {
    background: var(--primary-color-2);
    padding: 15px 0;
}

.breadcrumb-custom {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-item-custom {
    color: #6c757d;
}

.breadcrumb-item-custom a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-item-custom a:hover {
    color: #007bff;
}

.breadcrumb-item-custom.active {
    color: #000;
    font-weight: 500;
}

/* Page Title Section */
.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 8px 0 0 0;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
    }

    .breadcrumb-section {
        padding: 10px 0;
    }
}

.footer-section {
    position: relative;
    margin-top: 200px;
    /* Tăng margin để có đủ chỗ cho newsletter */
}

.newsletter-section {
    position: absolute;
    top: -100px;
    /* Đẩy lên để nằm nửa footer nửa trên */
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    margin: 0 20px;
    z-index: 10;
    min-height: 200px;
    /* Đặt chiều cao tối thiểu */
    display: flex;
    align-items: center;
}

.newsletter-content {
    padding: 50px 30px;
    /* Tăng padding */
    width: 100%;
}

.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    margin: 0;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.newsletter-form .input-group {
    margin-bottom: 0;
    border-radius: 50px;
    overflow: hidden;
    width: 350px;
}

.newsletter-form .input-group-text {
    background: white;
    border: none;
    color: var(--primary-color-5);
    padding-left: 20px;
}

.newsletter-form .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    background: white;
    color: var(--primary-color);
}

.newsletter-form .form-control:focus {
    box-shadow: none;
    border: none;
}

.newsletter-form .form-control::placeholder {
    color: var(--primary-color-5);
}

.newsletter-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 350px;
}

.newsletter-btn:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.main-footer {
    background: var(--primary-color-2);
    padding: 150px 0 30px;
    /* Tăng padding-top để có chỗ cho newsletter */
}

/* Responsive */
@media (max-width: 992px) {
    .footer-section {
        margin-top: 180px;
    }

    .newsletter-section {
        top: -90px;
        min-height: 180px;
    }

    .newsletter-content {
        padding: 40px 20px;
        text-align: center;
    }

    .newsletter-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .newsletter-form {
        align-items: center !important;
    }

    .newsletter-form .input-group,
    .newsletter-btn {
        width: 100% !important;
        max-width: 400px;
    }

    .main-footer {
        padding: 130px 0 30px;
    }
}

@media (max-width: 768px) {
    .footer-section {
        margin-top: 160px;
    }

    .newsletter-section {
        top: -80px;
        margin: 0 15px;
        min-height: 160px;
    }

    .newsletter-content {
        padding: 30px 15px;
    }

    .newsletter-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .newsletter-form {
        align-items: center;
    }

    .newsletter-form .input-group,
    .newsletter-btn {
        width: 100% !important;
        max-width: none;
    }

    .newsletter-form .form-control {
        padding: 10px 15px;
        font-size: 14px;
    }

    .newsletter-btn {
        padding: 10px 30px;
        font-size: 14px;
    }

    .main-footer {
        padding: 110px 0 20px;
    }

    .footer-bottom {
        text-align: center;
    }

    .payment-methods {
        justify-content: center;
        margin-top: 20px;
    }

    .copyright {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .footer-section {
        margin-top: 140px;
    }

    .newsletter-section {
        top: -85px;
        margin: 0 10px;
        min-height: 140px;
    }

    .newsletter-content {
        padding: 10px 10px !important;
    }

    .newsletter-title {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .newsletter-form {
        gap: 10px;
    }

    .newsletter-form .input-group-text {
        padding-left: 15px;
    }

    .newsletter-form .form-control {
        padding: 8px 15px;
        font-size: 13px;
    }

    .newsletter-btn {
        padding: 8px 20px;
        font-size: 13px;
    }

    .main-footer {
        padding: 90px 0 20px;
    }
}

/* Thêm các CSS còn thiếu cho footer */

.footer-brand .brand-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-brand .brand-description {
    color: var(--primary-color-3);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

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

.social-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

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

.links-list li {
    margin-bottom: 10px;
}

.links-list a {
    color: var(--primary-color-3);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.links-list a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding-top: 30px;
    margin-top: 40px;
}

.copyright {
    color: var(--primary-color-2);
    font-size: 14px;
    margin: 0;
}

/* .payment-methods {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
} */

.payment-methods img {
    height: 30px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 5px;
    background: white;
    transition: all 0.3s ease;
}

.payment-methods img:hover {
    border-color: var(--primary-color-2);
}

/* Mobile responsive cho footer elements */
@media (max-width: 768px) {

    .social-icons {
        padding: 0 5px;
    }

    .footer-bottom {
        text-align: center;
        padding: 20px 10px 0;
    }

    .payment-methods {
        justify-content: center;
        margin-top: 20px;
        padding: 0 10px;
    }

    .copyright {
        text-align: center;
        padding: 0 10px;
    }
}

@media (max-width: 576px) {

    .social-icons {
        padding: 0 10px;
    }

    .footer-bottom {
        padding: 15px 15px 0;
    }

    .payment-methods {
        padding: 0 15px;
    }

    .copyright {
        padding: 0 15px;
    }
}
