@font-face {
    font-family: 'Gilroy'; /* Name of the font family */
    src: url('/assets/ntpt_erpnext_app/fonts/Gilroy-Regular.ttf') format('truetype');
}

:root {
    --ntpt-products-max-width: 1360px;
    --ntpt-products-side-padding: 24px;
    --ntpt-surface: #ffffff;
    --ntpt-border: #e9ecef;
    --ntpt-muted: #6b7280;
    --ntpt-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
    --ntpt-shadow-hover: 0 14px 32px rgba(15, 23, 42, 0.12);
}

/* Product listing layout + typography polish */
body.ntpt-products-page .page-content .container {
    max-width: var(--ntpt-products-max-width);
    width: 100%;
    padding-left: var(--ntpt-products-side-padding);
    padding-right: var(--ntpt-products-side-padding);
}

body.ntpt-products-page #product-listing,
body.ntpt-products-page #products-grid-area,
body.ntpt-products-page #products-list-area {
    font-family: "Gilroy", "Inter", "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 992px) {
    body.ntpt-products-page .item-group-content > .row > #product-listing {
        flex: 0 0 82%;
        max-width: 82%;
    }

    body.ntpt-products-page .item-group-content > .row > .col-md-3 {
        flex: 0 0 18%;
        max-width: 18%;
    }

    body.ntpt-products-page #product-listing .list-image {
        min-width: 120px;
    }
}

body.ntpt-products-page #product-listing .list-row {
    padding: 1.1rem 1rem;
}

body.ntpt-products-page #product-listing .product-title,
body.ntpt-products-page #products-grid-area .product-title {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
}

body.ntpt-products-page #product-listing .product-category,
body.ntpt-products-page #products-grid-area .product-category {
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--red-600);
}

body.ntpt-products-page #product-listing .product-code {
    font-size: 12px;
    color: var(--red-500);
}

body.ntpt-products-page #product-listing .product-price,
body.ntpt-products-page #products-grid-area .product-price {
    font-size: 15px;
    font-weight: 600;
}

body.ntpt-products-page #products-grid-area .item-card {
    padding: 12px;
}

body.ntpt-products-page #products-grid-area .card {
    border-radius: 10px;
}

/* Product cards - clean B2B */
body.ntpt-products-page #products-grid-area .card,
body.ntpt-products-page #product-listing .list-row {
    background: var(--ntpt-surface);
    border: 1px solid var(--ntpt-border);
    box-shadow: var(--ntpt-shadow-soft);
}

body.ntpt-products-page #products-grid-area .card:hover,
body.ntpt-products-page #product-listing .list-row:hover {
    box-shadow: var(--ntpt-shadow-hover);
}

body.ntpt-products-page .card-img-container,
body.ntpt-products-page #product-listing .list-image {
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
}

body.ntpt-products-page #product-listing .list-row {
    border-radius: 12px;
    margin-bottom: 18px;
}

body.ntpt-products-page #product-listing .product-title,
body.ntpt-products-page #products-grid-area .product-title {
    color: #0f172a;
}

body.ntpt-products-page #product-listing .product-code,
body.ntpt-products-page #products-grid-area .product-category {
    color: var(--ntpt-muted);
}

body.ntpt-products-page .btn-add-to-cart-list,
body.ntpt-products-page .btn-explore-variants {
    border-radius: 8px;
    font-weight: 600;
}

body.ntpt-products-page .btn-add-to-cart-list.btn-primary {
    box-shadow: 0 6px 16px rgba(13, 72, 161, 0.18);
}

body.ntpt-products-page .cart-indicator-badge.is-loading {
    background: #e9ecef;
    color: #6c757d;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    animation: ntpt-pulse 1.2s ease-in-out infinite;
}

@keyframes ntpt-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
    body.ntpt-products-page .cart-indicator-badge.is-loading {
        animation: none;
    }
}

/* Cart page: row updating state */
body.ntpt-cart-page .cart-items tr.is-updating {
    opacity: 0.6;
    transition: opacity 150ms ease-in-out;
}

body.ntpt-cart-page .cart-items tr.is-updating .cart-btn,
body.ntpt-cart-page .cart-items tr.is-updating .cart-qty,
body.ntpt-cart-page .cart-items tr.is-updating textarea {
    pointer-events: none;
}

body.ntpt-cart-page .cart-items tr.is-updating .cart-qty {
    background-color: #f8f9fa;
}

body.ntpt-cart-page {
    font-family: "Gilroy", "Inter", "Helvetica Neue", Arial, sans-serif;
}

body.ntpt-cart-page .cart-container .frappe-card {
    border: 1px solid var(--ntpt-border);
    border-radius: 12px;
    box-shadow: var(--ntpt-shadow-soft);
}

body.ntpt-cart-page .cart-table thead th {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ntpt-muted);
    border-bottom: 1px solid var(--ntpt-border);
}

body.ntpt-cart-page .cart-items tr {
    border-bottom: 1px solid var(--ntpt-border);
}

body.ntpt-cart-page .cart-item-image img,
body.ntpt-cart-page .no-image-cart-item {
    border-radius: 10px;
    background: #f8fafc;
}

body.ntpt-cart-page .cart-btn {
    border: 1px solid var(--ntpt-border);
    background: #ffffff;
    border-radius: 6px;
}

body.ntpt-cart-page .cart-qty {
    border-radius: 6px;
    height: 36px;
}

body.ntpt-cart-page .item-title {
    font-weight: 600;
    color: #0f172a;
}

body.ntpt-cart-page .item-subtitle {
    color: var(--ntpt-muted);
    font-size: 12px;
}

/* High-contrast page backdrop for visible B2C-like polish */
body.ntpt-products-page .page-content-wrapper,
body.ntpt-cart-page .page-content-wrapper,
body.ntpt-products-page .page_content,
body.ntpt-cart-page .page_content {
    padding-top: 24px;
    padding-bottom: 24px;
}

/* Reduce hero/slideshow height on product listing pages */
body.ntpt-products-page .item-group-slideshow .carousel-item {
    height: clamp(200px, 22vw, 320px) !important;
}

body.ntpt-products-page .item-group-slideshow .carousel-item img {
    object-position: center;
}

body.ntpt-products-page .item-group-slideshow {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    body.ntpt-products-page .item-group-slideshow .carousel-item {
        height: 200px !important;
    }
}
