/* Skin Aesthetics — B2C responsive overrides */

/* Homepage category carousel — centered labels, no product counts */
.csm-categories-style .aqf-categories-item .b2c-category-link {
    display: block;
}

.csm-categories-style .aqf-categories-item .b2c-category-label {
    display: block;
    margin-top: 16px;
    min-height: 2.6em;
    padding: 0 4px;
    text-align: center;
    line-height: 1.3;
    text-transform: none;
}

/* Prevent horizontal scroll */
html,
body {
    overflow-x: clip;
}

/* Mobile bottom menu clearance */
@media (max-width: 767.98px) {
    main.b2c-main {
        padding-bottom: 72px;
    }
}

/* Hero slider image fix */
.aqf-slider-area.csm-slider-style .aqf-slider-thumb img {
    margin-inline-end: 0;
}

/* Logo — wide Skin Aesthetics mark */
.b2c-site-logo {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

@media (max-width: 575.98px) {
    .b2c-site-logo {
        height: 32px;
        max-width: 130px;
    }
}

/* Breadcrumb spacing below header */
.b2c-breadcrumb-area {
    margin-top: 32px;
    padding-top: 48px;
    padding-bottom: 40px;
}

@media (max-width: 767.98px) {
    .b2c-breadcrumb-area {
        margin-top: 20px;
        padding-top: 32px;
        padding-bottom: 32px;
    }
}

/* Flash alerts */
.b2c-flash-alert {
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    min-width: 0 !important;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
}

.b2c-flash-alert-text {
    flex: 1;
    min-width: 0;
}

.b2c-flash-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    margin: 0 0 0 4px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    opacity: 1;
    cursor: pointer;
    transition: background-color 0.2s;
}

.b2c-flash-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.alert-success .b2c-flash-close {
    color: #0f5132;
}

.alert-danger .b2c-flash-close {
    color: #842029;
}

/* Responsive section titles */
@media (max-width: 767.98px) {
    .aq-section-title.fs-84 {
        font-size: clamp(32px, 9vw, 50px) !important;
        line-height: 1.15;
    }

    .aq-section-title.fs-48,
    .fs-48 {
        font-size: clamp(26px, 7vw, 36px) !important;
    }

    .aq-section-title.fs-36 {
        font-size: clamp(22px, 6vw, 30px) !important;
    }

    .aq-section-title.fs-40 {
        font-size: clamp(24px, 6.5vw, 32px) !important;
    }
}

/* Product card image zoom on hover */
.aq-product-item .aq-product-thumb.aq-img-hover-wrap > a {
    display: block;
    overflow: hidden;
}

.aq-product-item .aq-product-thumb.aq-img-hover-wrap .aq-product-img {
    transition: transform 0.45s ease;
}

.aq-product-item:hover .aq-product-thumb.aq-img-hover-wrap .aq-product-img {
    transform: scale(1.05);
}

.aq-product-item .aq-product-thumb.aq-img-hover-wrap .aq-img-hover {
    display: none;
}

/* Related products — smaller card images */
.b2c-related-products .aq-product-thumb.aq-img-hover-wrap {
    height: 220px;
    max-height: 220px;
    margin-bottom: 12px;
}

.b2c-related-products .aq-product-thumb.aq-img-hover-wrap img {
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.b2c-related-products .aq-product-item {
    margin-bottom: 30px !important;
}

@media (max-width: 767.98px) {
    .b2c-related-products .aq-product-thumb.aq-img-hover-wrap {
        height: 180px;
        max-height: 180px;
    }
}

/* Product detail gallery */
.b2c-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.b2c-product-gallery-viewport {
    width: 100%;
}

.b2c-product-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 520px;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.b2c-product-gallery-main-img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 24px;
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
    animation: b2c-gallery-fade 0.35s ease;
}

@keyframes b2c-gallery-fade {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.b2c-product-gallery-placeholder {
    background: #f8f8f8;
}

.b2c-product-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(20, 20, 20, 0.1);
    border-radius: 50%;
    background: #fff;
    color: #141414;
    transform: translateY(-50%);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(20, 20, 20, 0.08);
}

.b2c-product-gallery-nav:hover {
    background: #141414;
    color: #fff;
    border-color: #141414;
}

.b2c-product-gallery-nav-prev {
    left: 12px;
}

.b2c-product-gallery-nav-next {
    right: 12px;
}

.b2c-product-gallery-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(20, 20, 20, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.b2c-product-gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    padding: 2px 2px 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.b2c-product-gallery-thumb {
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    padding: 6px;
    border: 2px solid rgba(20, 20, 20, 0.1);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.b2c-product-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.b2c-product-gallery-thumb:hover {
    border-color: rgba(20, 20, 20, 0.35);
}

.b2c-product-gallery-thumb.is-active {
    border-color: #141414;
    box-shadow: 0 0 0 1px #141414;
}

@media (max-width: 767.98px) {
    .b2c-product-gallery {
        gap: 12px;
    }

    .b2c-product-gallery-main {
        max-height: none;
    }

    .b2c-product-gallery-thumb {
        flex: 0 0 76px;
        width: 76px;
        height: 76px;
        padding: 5px;
    }

    .b2c-product-gallery-nav {
        width: 34px;
        height: 34px;
    }

    .b2c-product-gallery-main-img {
        padding: 16px;
    }
}

/* Legacy single-image helpers (kept for compatibility) */
.b2c-product-detail-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.b2c-product-detail-img-placeholder {
    width: 100%;
    min-height: 280px;
    height: clamp(280px, 55vw, 500px);
}

@media (max-width: 767.98px) {
    .b2c-product-detail-img {
        max-height: 360px;
    }
}

/* Product tabs horizontal scroll on mobile */
@media (max-width: 767.98px) {
    .csm-product-tab-btn .nav-tab,
    .aq-product-tab {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 4px;
    }

    .csm-product-tab-btn .nav-tab::-webkit-scrollbar,
    .aq-product-tab::-webkit-scrollbar {
        display: none;
    }

    .csm-product-tab-btn .nav-links,
    .aq-product-tab .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Community stories — shorter cards on mobile */
@media (max-width: 767.98px) {
    .csm-stories-style .csm-stories-item {
        height: auto !important;
        min-height: 320px;
    }
}

/* Auth / checkout panels */
.b2c-panel {
    background: #f8f3f0;
    border-radius: 8px;
    padding: 32px;
}

.b2c-panel + .b2c-panel {
    margin-top: 24px;
}

.b2c-panel h4,
.b2c-panel h5 {
    margin-bottom: 20px;
}

.b2c-panel .table > :not(caption) > * > * {
    padding: 12px 0;
    background: transparent;
}

.b2c-panel .table thead th {
    padding-top: 0;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.b2c-panel .table tfoot td {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.b2c-checkout-sidebar .aq-checkout-payment {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.b2c-checkout-sidebar .aq-checkout-payment-item:not(:last-child) {
    margin-bottom: 14px;
}

.b2c-checkout-submit {
    margin-top: 24px;
}

.b2c-remember-me {
    display: flex;
    align-items: center;
}

@media (max-width: 767.98px) {
    .b2c-panel {
        padding: 24px 20px;
    }
}

@media (max-width: 575.98px) {
    .aq-login-wrapper,
    .aq-register-wrapper,
    .aq-cart-summary,
    .aq-checkout-order,
    .aq-checkout-payment,
    .aq-order-meta,
    .b2c-panel {
        padding: 24px 20px !important;
    }
}

/* Cart table — card layout on small screens */
@media (max-width: 767.98px) {
    .b2c-cart-table thead {
        display: none;
    }

    .b2c-cart-table tbody tr {
        display: block;
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .b2c-cart-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        border: none;
        text-align: right;
    }

    .b2c-cart-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        flex-shrink: 0;
    }

    .b2c-cart-table tbody td:first-child {
        display: block;
        text-align: left;
    }

    .b2c-cart-table tbody td:first-child::before {
        display: none;
    }

    .b2c-cart-table tbody td:last-child {
        justify-content: flex-end;
    }

    .b2c-cart-table tbody td:last-child::before {
        display: none;
    }
}

/* Account sidebar — horizontal scroll tabs on mobile */
@media (max-width: 991.98px) {
    .aq-dashboard-sidebar {
        padding: 16px 12px;
    }

    .aq-dashboard-sidebar-menu {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .aq-dashboard-sidebar-menu::-webkit-scrollbar {
        display: none;
    }

    .aq-dashboard-sidebar-menu li {
        flex-shrink: 0;
        margin: 0;
    }

    .aq-dashboard-sidebar-menu a,
    .aq-dashboard-sidebar-menu button {
        margin-bottom: 0;
        white-space: nowrap;
        padding: 10px 14px !important;
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .aq-dashboard-sidebar-menu a span:first-child,
    .aq-dashboard-sidebar-menu button span:first-child {
        margin-inline-end: 8px !important;
    }
}

/* Product detail quantity selector */
.aq-product-details-area .aq-product-quantity {
    position: relative;
    display: block;
    width: 140px;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.aq-product-details-area .aq-product-quantity .aq-cart-minus,
.aq-product-details-area .aq-product-quantity .aq-cart-plus {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    z-index: 2;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    cursor: pointer;
}

.aq-product-details-area .aq-product-quantity .aq-cart-plus {
    inset-inline-start: auto;
    inset-inline-end: 14px;
}

.aq-product-details-area .aq-product-quantity .aq-cart-input[type="text"] {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 36px;
    font-size: 16px;
    text-align: center;
    background-color: var(--aq-common-white);
    border: 1px solid rgba(15, 15, 15, 0.1);
    border-radius: 5px;
    box-shadow: none;
}

.aq-product-details-area .aq-product-quantity .aq-cart-input[type="text"]:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 1399px) {
    .aq-product-details-area .aq-product-quantity .aq-cart-input[type="text"] {
        height: 42px;
    }
}

/* Product detail actions — quantity, then cart + buy */
.aq-product-details-area .b2c-product-actions-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 480px;
}

.aq-product-details-area .b2c-product-quantity-row {
    margin-bottom: 24px;
}

.aq-product-details-area .b2c-product-actions-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 12px;
    width: 100%;
}

.aq-product-details-area .b2c-product-actions .aq-product-details-add-to-cart-btn,
.aq-product-details-area .b2c-product-actions .aq-product-details-buy-now-btn {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
}

.aq-product-details-area .b2c-product-wishlist-btn {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid rgba(20, 20, 20, 0.15);
    border-radius: 30px;
    background: #fff;
    color: #141414;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.aq-product-details-area .b2c-product-wishlist-btn:hover {
    border-color: #141414;
    background: #141414;
    color: #fff;
}

.aq-product-details-area .b2c-product-wishlist-btn.is-wishlisted {
    border-color: #e74c3c;
    color: #e74c3c;
}

.aq-product-details-area .b2c-product-wishlist-btn.is-wishlisted:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.aq-product-details-area .b2c-product-wishlist-btn svg {
    flex-shrink: 0;
}

@media (max-width: 399.98px) {
    .aq-product-details-area .b2c-product-actions-buttons {
        grid-template-columns: 1fr;
    }
}

/* Blog cards */
.b2c-blog-card-img {
    height: 220px;
    object-fit: cover;
}

.b2c-blog-feature-img {
    max-height: 460px;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .b2c-blog-card-img {
        height: 200px;
    }

    .b2c-blog-feature-img {
        max-height: 280px;
    }
}

/* CMS / blog content */
.aq-product-description-content img,
.b2c-cms-content img {
    max-width: 100%;
    height: auto;
}

/* Tables always scrollable fallback */
.b2c-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.b2c-table-wrap > table {
    min-width: 480px;
}

@media (max-width: 767.98px) {
    .b2c-table-wrap > table {
        min-width: 100%;
    }
}

/* Container padding on very small screens */
@media (max-width: 575.98px) {
    .container,
    .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Footer spacing above bottom menu */
@media (max-width: 767.98px) {
    .aq-footer-area {
        padding-bottom: 16px;
    }
}

/* Footer trust badges — sizing lives in B2cFooter.vue */
.aq-copyright-payment .b2c-footer-payments {
    max-width: 100%;
}

/* Homepage featured product banners */
.b2c-featured-banner.aqf-banner-2-box {
    overflow: hidden;
}

.b2c-featured-banner__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    pointer-events: none;
}

.b2c-featured-banner--align-left .b2c-featured-banner__overlay {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 36% 60px 12% 60px;
}

.b2c-featured-banner--align-right .b2c-featured-banner__overlay {
    inset-inline-start: 50%;
    inset-inline-end: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0 48px 8% 20px;
}

.b2c-featured-banner--align-right .b2c-featured-banner__overlay::before {
    content: '';
    display: block;
    flex: 1 1 auto;
    min-height: 34%;
    width: 1px;
    pointer-events: none;
}

.b2c-featured-banner__body {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 2.5vw, 28px);
    max-width: min(90%, 320px);
    pointer-events: auto;
}

.b2c-featured-banner--align-left .b2c-featured-banner__body {
    align-items: flex-start;
    text-align: left;
}

.b2c-featured-banner--align-right .b2c-featured-banner__body {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
    gap: clamp(14px, 2vw, 22px);
}

.b2c-featured-banner--align-right .b2c-featured-banner__features {
    font-size: clamp(13px, 1.4vw, 16px);
}

.b2c-featured-banner__cta {
    position: static;
    margin: 0;
    flex-shrink: 0;
}

.b2c-featured-banner--theme-light .b2c-featured-banner__features,
.b2c-featured-banner--theme-light .b2c-featured-banner__description {
    color: #fff;
}

.b2c-featured-banner--theme-dark .b2c-featured-banner__features,
.b2c-featured-banner--theme-dark .b2c-featured-banner__description {
    color: #0f0f0f;
}

.b2c-featured-banner__features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: clamp(14px, 1.6vw, 17px);
    line-height: 1.55;
}

.b2c-featured-banner__features li + li {
    margin-top: 6px;
}

.b2c-featured-banner__description {
    font-size: clamp(14px, 1.6vw, 17px);
    line-height: 1.55;
    margin: 0;
    white-space: pre-line;
}

@media only screen and (min-width: 1200px) and (max-width: 1399px),
    only screen and (min-width: 768px) and (max-width: 991px) {
    .b2c-featured-banner--align-left .b2c-featured-banner__overlay {
        padding-left: 30px;
        padding-right: 30px;
    }

    .b2c-featured-banner--align-right .b2c-featured-banner__overlay {
        padding-left: 16px;
        padding-right: 30px;
    }
}

@media (max-width: 767.98px) {
    .b2c-featured-banner--align-left .b2c-featured-banner__overlay {
        padding: 34% 24px 14% 24px;
    }

    .b2c-featured-banner--align-right .b2c-featured-banner__overlay {
        inset-inline-start: 46%;
        padding: 0 24px 7% 16px;
    }

    .b2c-featured-banner--align-right .b2c-featured-banner__overlay::before {
        min-height: 30%;
    }

    .b2c-featured-banner__body {
        max-width: 92%;
        gap: 14px;
    }

    .b2c-featured-banner__features,
    .b2c-featured-banner__description {
        font-size: 13px;
    }
}

@media (max-width: 767.98px) {
    .aq-copyright-payment .b2c-footer-payments {
        margin-top: 4px;
    }
}
