* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background: #fff;
}

/* ===== HEADER ===== */
.hl-header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hl-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.hl-header-top {
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.hl-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.hl-logo img {
    height: 36px;
    width: auto;
}

.hl-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #16a34a;
    white-space: nowrap;
}

.hl-search {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
}

.hl-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: #374151;
}

.hl-search-input:focus {
    border-color: #16a34a;
}

.hl-search-input::placeholder {
    color: #9ca3af;
}

.hl-search-wrapper {
    position: relative;
}

.hl-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
}

.hl-header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.hl-header-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.hl-header-link:hover {
    color: #16a34a;
}

.hl-header-link i {
    font-size: 18px;
}

/* Header Dropdown Menus */
.hl-header-dropdown {
    position: relative;
}

.hl-header-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 8px;
    padding-top: 12px;
    margin-top: -4px;
    display: none;
    z-index: 1000;
}

.hl-header-dropdown:hover .hl-header-dropdown-menu,
.hl-header-dropdown-menu:hover {
    display: block;
}

.hl-header-dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hl-header-dropdown-menu ul li {
    margin-bottom: 2px;
}

.hl-header-dropdown-menu ul li:last-child {
    margin-bottom: 0;
}

.hl-header-dropdown-menu ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.hl-header-dropdown-menu ul li a:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.hl-header-dropdown-menu ul li.active a {
    background: #16a34a;
    color: #ffffff;
}

.hl-header-dropdown-menu ul li a svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.hl-cart-empty {
    padding: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.hl-cart-items {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.hl-cart-items::-webkit-scrollbar {
    width: 6px;
}

.hl-cart-items::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.hl-cart-items::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.hl-cart-items::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.hl-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #f3f4f6;
}

.hl-cart-item:last-child {
    margin-bottom: 0;
}

.hl-cart-item-image-wrapper {
    width: 42px;
    height: 58px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #e6f5ed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.hl-cart-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hl-cart-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.hl-cart-item-title {
    font-size: 13px;
    color: #374151;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

.hl-cart-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hl-cart-item-delete {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: none;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.hl-cart-item-delete:hover {
    background: #fef2f2;
    color: #ef4444;
}

.hl-cart-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    border-top: 1px solid #f3f4f6;
}

.hl-cart-total-label {
    color: #6b7280;
}

.hl-cart-total-value {
    color: #1f2937;
}

.hl-cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Navigation bar */
.hl-nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.hl-nav-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.hl-nav-authors {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: clamp(13px, 1.1vw, 15px);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-right: 8px;
    width: 260px;
}

/* Hide Bootstrap's default caret - we use our own icon */
.hl-nav-authors.dropdown-toggle::after {
    display: none;
}

@media (min-width: 1400px) {
    .hl-nav-authors {
        width: 280px;
    }
}

.hl-nav-authors:hover {
    background: #15803d;
}

.hl-nav-authors[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown: hardcoded same px width as button — the only reliable way */
.hl-nav-authors + .dropdown-menu {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    background-color: #16a34a;
    border: none;
    border-radius: 8px;
    padding: 0;
    margin-top: 4px !important;
}

@media (min-width: 1400px) {
    .hl-nav-authors + .dropdown-menu {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
}

.hl-nav-authors + .dropdown-menu .dropdown-item {
    color: #fff;
    padding: 10px 16px;
    font-size: clamp(13px, 1.1vw, 15px);
    font-weight: 500;
    white-space: normal;       /* allow text to wrap to next line */
    overflow-wrap: break-word; /* break very long words if needed */
    transition: background 0.15s;
}

.hl-nav-authors + .dropdown-menu li:last-child {
    border-bottom: 0 !important;
}

.hl-nav-authors + .dropdown-menu .dropdown-item:hover,
.hl-nav-authors + .dropdown-menu .dropdown-item:focus {
    background-color: #15803d;
    color: #fff;
}

.hl-nav-link {
    padding: 14px 10px;
    color: #374151;
    text-decoration: none;
    font-size: clamp(13px, 1.1vw, 15px);
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s;
}

@media (min-width: 1400px) {
    .hl-nav-link {
        padding: 14px 14px;
    }
}

.hl-nav-link:hover {
    color: #16a34a;
}

.hl-nav-link.hl-hot {
    color: #ea580c;
    font-weight: 600;
}

/* Subscription badge animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ===== MAIN CONTENT ===== */
.hl-main {
    min-height: calc(100vh - 280px);
    background-color: #f4f4f4;
    padding: 1px 0;
}

/* ===== FOOTER ===== */
.hl-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 48px 20px 32px;
}

.hl-footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: 40px;
}

.hl-footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-bottom: 20px;
}

.hl-footer-logo img {
    height: 32px;
    width: auto;
}

.hl-footer-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #16a34a;
}

.hl-footer-payment-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.hl-footer-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hl-footer-payments img {
    height: 36px;
    width: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 8px;
    background: #fff;
}

.hl-footer-heading {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

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

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

.hl-footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.hl-footer-links a:hover {
    color: #16a34a;
}

.hl-footer-contact-item {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.hl-footer-contact-value {
    font-size: 14px;
    font-weight: 600;
    color: #16a34a;
    text-decoration: none;
    display: block;
    margin-bottom: 14px;
}

.hl-footer-contact-value:hover {
    text-decoration: underline;
}

.hl-footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.hl-footer-socials a {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.15s;
}

.hl-footer-socials a:hover {
    border-color: #16a34a;
    color: #16a34a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hl-header-top {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .hl-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .hl-nav-inner {
        overflow-x: auto;
        padding: 0 16px;
        -webkit-overflow-scrolling: touch;
    }

    .hl-nav-inner::-webkit-scrollbar {
        display: none;
    }

    .hl-footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
