.product-card {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #dbe4ee;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
}

.suggest-today-shell {
    width: 100%;
    max-width: 100%;
}

.flash-sale-shell {
    width: 100%;
    max-width: 100%;
}

.card-img {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: clamp(14px, 2vw, 22px);
    background: linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    padding: 14px !important;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.product-category-badge {
    display: inline-flex;
    align-self: flex-start;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.product-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(0.88rem, 0.9vw + 0.58rem, 0.98rem);
    font-weight: 400;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.45em * 2);
}

.product-rating {
    font-size: 0.9rem;
    line-height: 1.4;
}

.product-price {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: clamp(0.98rem, 1vw + 0.65rem, 1.1rem);
    line-height: 1.35;
    text-align: center;
}

.product-price .old {
    margin-left: 0;
    font-size: 0.85rem;
}

.sale-badge,
.badge-blue {
    position: absolute;
    left: 12px;
    z-index: 2;
    max-width: calc(100% - 56px);
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sale-badge {
    top: 12px;
}

.badge-blue {
    top: 44px;
}

.wishlist {
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.product-actions {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 2;
    padding: 16px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
}

.card-img:hover .product-actions,
.product-card:focus-within .product-actions {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.product-actions .btn,
.product-actions form,
.product-actions form .btn {
    width: 100%;
    max-width: 132px;
}

.product-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .product-card:hover {
        transform: none;
    }
}

@media (min-width: 1200px) {
    .flash-sale-shell,
    .suggest-today-shell {
        max-width: 1260px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 18px;
        padding-right: 18px;
    }

    .flash-sale-track,
    .suggest-product-grid {
        --bs-gutter-x: 1.1rem;
        --bs-gutter-y: 1.1rem;
    }

    .flash-item {
        flex: 0 0 calc(25% - 0.85rem);
        display: flex;
        justify-content: center;
    }

    .flash-item .product-card {
        width: 100%;
    }

    .suggest-product-grid > [class*='col-'] {
        display: flex;
        justify-content: center;
    }

    .flash-item .product-card,
    .suggest-product-grid .product-card {
        width: 100%;
        max-width: 285px;
    }

    .flash-item .card-img,
    .suggest-product-grid .card-img {
        padding: 16px;
    }

    .flash-item .product-card-body,
    .suggest-product-grid .product-card-body {
        padding: 12px !important;
        gap: 8px;
    }

    .flash-item .product-title,
    .suggest-product-grid .product-title {
        font-size: 0.92rem;
    }

    .flash-item .product-price,
    .suggest-product-grid .product-price {
        font-size: 1rem;
    }
}

@media (min-width: 1400px) {
    .flash-sale-shell,
    .suggest-today-shell {
        max-width: 1320px;
    }
}

@media (max-width: 767.98px) {
    .product-card {
        border-radius: 16px;
    }

    .card-img {
        padding: 14px;
    }

    .badge-blue {
        top: 42px;
    }

    .product-title {
        font-size: 0.92rem;
        min-height: calc(1.4em * 2);
    }

    .product-actions {
        gap: 10px;
        padding: 14px;
    }
}

@media (max-width: 575.98px) {
    .category-page > .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .product-card {
        border-radius: 10px;
        border-color: #e5e7eb;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    }

    .product-card-body {
        padding: 10px 10px 12px !important;
        gap: 6px;
        align-items: flex-start;
    }

    .product-rating {
        font-size: 0.85rem;
        text-align: left;
    }

    .product-price {
        font-size: 1.06rem;
        text-align: left;
    }

    .product-title {
        font-size: 0.93rem;
        line-height: 1.34;
        min-height: calc(1.34em * 2);
        text-align: left;
    }

    .card-img {
        padding: 8px;
        background: #fff;
        aspect-ratio: 1 / 1;
    }

    .product-meta {
        gap: 6px;
        width: 100%;
    }

    .product-category-badge {
        max-width: 100%;
        padding: 5px 8px;
        font-size: 10px;
        border-radius: 8px;
        line-height: 1.25;
    }

    .product-actions .btn {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .wishlist {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .product-list-grid {
        --bs-gutter-x: 0.35rem;
        --bs-gutter-y: 0.55rem;
    }

    .suggest-product-grid {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.65rem;
    }

    .flash-item .product-card {
        max-width: none;
    }

    .sale-badge,
    .badge-blue {
        left: 8px;
        max-width: calc(100% - 44px);
        padding: 5px 8px;
        font-size: 9px;
    }

    .sale-badge {
        top: 8px;
    }

    .badge-blue {
        top: 34px;
    }
}

.whats-new {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.whats-new-header {
    gap: 16px;
}

.whats-new-header h2 {
    font-size: clamp(2rem, 3vw, 2.7rem);
    letter-spacing: -0.03em;
}

.whats-new-link {
    color: #1d63ed;
    font-size: 0.98rem;
    font-weight: 600;
    white-space: nowrap;
}

.whats-new-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.whats-new-main,
.whats-new-side {
    min-width: 0;
}

.whats-new-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.whats-new-featured-link {
    display: block;
    border-radius: 22px;
}

.whats-new-secondary-link {
    display: block;
}

.news-featured {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 420px;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;
    background: #111827;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.news-featured::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 15%, rgba(15, 23, 42, 0.78) 100%);
    z-index: 1;
}

.news-featured img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-featured {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #ff5b57;
}

.news-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 28px 22px 22px;
}

.news-overlay h6 {
    margin-bottom: 8px;
    font-size: clamp(1.18rem, 1.5vw, 1.45rem);
    font-weight: 700;
    line-height: 1.35;
}

.news-overlay small,
.news-overlay small a {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    line-height: 1.5;
}

.news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 118px;
    margin-bottom: 0;
    padding: 12px;
    border: 1px solid #dbe7f3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    border-color: #bfd3eb;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.news-item-secondary {
    min-height: 126px;
}

.news-item .thumb {
    width: 110px;
    min-width: 110px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
    background: #eef2f7;
}

.news-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

.news-text h6 {
    margin-bottom: 8px;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.news-text small,
.news-text small a {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .whats-new-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .whats-new-layout {
        grid-template-columns: 1fr;
    }

    .news-featured {
        min-height: 360px;
    }
}

@media (max-width: 767.98px) {
    .whats-new {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .whats-new-header h2 {
        font-size: 1.85rem;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .news-featured {
        min-height: 300px;
        border-radius: 18px;
    }

    .news-overlay {
        padding: 20px 16px 16px;
    }

    .news-item {
        min-height: 108px;
        padding: 10px;
        border-radius: 14px;
    }

    .news-item .thumb {
        width: 92px;
        min-width: 92px;
        height: 74px;
    }

    .news-text h6 {
        font-size: 0.96rem;
    }
}

@media (max-width: 575.98px) {
    .whats-new-layout {
        gap: 18px;
    }

    .news-featured {
        min-height: 270px;
    }

    .news-item {
        gap: 12px;
        min-height: 98px;
    }

    .news-item .thumb {
        width: 84px;
        min-width: 84px;
        height: 68px;
    }

    .news-overlay h6 {
        font-size: 1.05rem;
    }
}

.modern-navbar {
    min-height: 62px;
    backdrop-filter: blur(8px);
}

.modern-navbar .navbar-brand img {
    height: 42px;
    width: auto;
}

.modern-nav-links {
    gap: 10px;
}

.modern-nav-links .nav-link {
    font-weight: 500;
    color: #4b5563;
    padding: 8px 12px !important;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.modern-nav-links .nav-link:hover {
    color: #0f8e95;
    background: #eef9f9;
}

.modern-nav-links .nav-link.active {
    color: #0f8e95 !important;
    background: #e4f4f4;
    font-weight: 600;
}

.modern-nav-actions a {
    font-weight: 500;
}

.modern-nav-actions .btn {
    border-radius: 999px;
    padding: 6px 12px;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    z-index: 1060;
    gap: 4px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}

.mobile-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #6b7280;
    font-size: 10px;
    font-weight: 500;
    padding: 7px 0 6px;
    border-radius: 12px;
    min-width: 0;
}

.mobile-bottom-link i {
    font-size: 17px;
    line-height: 1;
}

.mobile-bottom-link span {
    display: block;
    max-width: 100%;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-bottom-link.active {
    color: #10959c;
    background: #edf7f7;
}

.mobile-bottom-badge {
    position: absolute;
    top: 1px;
    right: 18px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    padding: 0 4px;
}

.mobile-search-toggle {
    border: 0;
    background: transparent;
}

@media (max-width: 380px) {
    .mobile-bottom-nav {
        gap: 2px;
        padding-inline: 4px;
    }

    .mobile-bottom-link {
        font-size: 9px;
        padding-top: 6px;
    }

    .mobile-bottom-link i {
        font-size: 16px;
    }
}

.mobile-footer-search-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(66px + env(safe-area-inset-bottom));
    z-index: 1061;
    padding: 0 12px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: all 0.22s ease;
}

.mobile-footer-search-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-footer-search-inner {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    padding: 10px;
}

.mobile-footer-search-form {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.mobile-footer-search-form input {
    width: 100%;
    border: 0;
    outline: none;
    padding: 10px 12px;
    font-size: 14px;
}

.mobile-footer-search-form button {
    border: 0;
    background: #10959c;
    color: #fff;
    padding: 10px 14px;
}

.mobile-footer-search-close {
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #111827;
    padding: 10px 12px;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom));
    }

    .modern-navbar {
        min-height: 56px;
    }

    .modern-navbar .navbar-brand img {
        height: 36px;
    }

    .mobile-navbar,
    .search-bar {
        display: none !important;
    }
}
