:root {
    --sf-primary: #0f5bd7;
    --sf-primary-dark: #0b46aa;
    --sf-accent: #e64a19;
    --sf-ink: #142033;
    --sf-muted: #64748b;
    --sf-line: #dfe6ef;
    --sf-surface: #ffffff;
    --sf-soft: #f6f8fb;
    --sf-success: #087a55;
    --sf-danger: #b42318;
    --sf-radius: 12px;
    --sf-shadow: 0 10px 28px rgba(20, 32, 51, .07);
}

body {
    color: var(--sf-muted);
    background: var(--sf-surface);
}

h1, h2, h3, h4, h5, h6,
.title, .product-title, .btn, button, input, select, textarea {
    font-family: "Poppins", sans-serif;
}

h1, h2, h3, h4, h5, h6, .title {
    color: var(--sf-ink);
    letter-spacing: -.025em;
}

.btn,
button,
.form-control,
select {
    border-radius: 8px !important;
}

.btn {
    min-height: 44px;
    font-weight: 700;
}

.btn-primary,
.btn-primary-2,
.btn-order,
.btn-product.btn-cart {
    border-color: var(--sf-primary) !important;
    background: var(--sf-primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary-2:hover,
.btn-order:hover,
.btn-product.btn-cart:hover {
    border-color: var(--sf-primary-dark) !important;
    background: var(--sf-primary-dark) !important;
}

.sf-home-section {
    padding: 3.2rem 0 2rem;
}

.sf-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.8rem;
}

.sf-section-heading span,
.sf-promotion-strip__content div > span,
.sf-section-kicker {
    display: block;
    margin-bottom: .25rem;
    color: var(--sf-primary);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.electronics,
.for-you {
    padding-top: 2.4rem;
    padding-bottom: 1.2rem;
}

.sf-product-showcase {
    padding: 3rem 0 1.5rem;
}

.sf-product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.4rem;
}

.sf-product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    background: #fff;
    box-shadow: none;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.sf-product-card:hover {
    border-color: #b7c8df;
    transform: translateY(-2px);
    box-shadow: var(--sf-shadow);
}

.sf-product-card .product-media {
    margin: 0;
    aspect-ratio: 1 / 1;
}

.sf-product-card .product-media > a:not(.btn-product-compare--corner) {
    display: block;
    width: 100%;
    height: 100%;
}

.sf-product-card .btn-product-compare--corner {
    top: .8rem;
    right: .8rem;
    left: auto;
    bottom: auto;
    z-index: 8;
    width: 42px !important;
    height: 42px !important;
    min-height: 42px;
    padding: 0 !important;
}

.sf-product-card .product-media img {
    width: 100%;
    height: 100%;
}

.sf-product-card .product-action {
    left: .9rem;
    right: .9rem;
    bottom: .9rem;
    width: auto;
    padding: 0;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.sf-product-card:hover .product-action,
.sf-product-card:focus-within .product-action {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sf-product-card .product-action .btn-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: 100%;
    min-height: 46px;
    padding: .8rem 1rem;
    border: 1px solid rgba(15, 91, 215, .2) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, .96) !important;
    color: var(--sf-ink) !important;
    box-shadow: 0 7px 18px rgba(20, 32, 51, .12);
    font-size: 1.18rem;
    font-weight: 750;
    letter-spacing: 0;
}

.sf-product-card .product-action .btn-cart::before { display: none; }
.sf-product-card .product-action .btn-cart i { color: var(--sf-primary); font-size: 1.55rem; }
.sf-product-card .product-action .btn-cart:hover,
.sf-product-card .product-action .btn-cart:focus {
    background: var(--sf-primary-dark) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(11, 70, 170, .26);
}
.sf-product-card .product-action .btn-cart:hover i,
.sf-product-card .product-action .btn-cart:focus i { color: #fff; }

.sf-product-card .product-body {
    padding: 1.25rem;
}

.sf-product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .8rem;
    color: var(--sf-muted);
    font-size: 1.05rem;
    font-weight: 600;
}

.sf-stock-dot {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.sf-stock-dot i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d97706;
}

.sf-stock-dot.is-available { color: var(--sf-success); }
.sf-stock-dot.is-available i { background: var(--sf-success); }

.sf-product-card .product-title {
    min-height: 4.5rem;
    margin-bottom: .75rem;
}

.sf-product-card .product-title a {
    color: var(--sf-ink);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.45;
}

/* Product detail pages have a large main price; keep showcase prices isolated. */
.sf-product-card .product-price,
.sf-product-card .product-price .new-price {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.86;
}

/* Prevent product-detail typography from leaking into related showcase cards. */
.sf-product-card .product-title {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.sf-product-card .product-title a {
    font-size: 1.4rem;
    line-height: 1.45;
    letter-spacing: -.01em;
    word-spacing: 0;
}

.sf-product-card .product-price,
.sf-product-card .product-price * {
    letter-spacing: normal;
    word-spacing: 0;
}

.sf-delivery-note {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 3.4rem;
    margin: .8rem 0 0;
    color: var(--sf-muted);
    font-size: 1.05rem;
    line-height: 1.4;
}

.sf-delivery-note i { color: var(--sf-primary); font-size: 1.4rem; }

@media (max-width: 1199px) {
    .sf-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .sf-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.electronics .heading,
.for-you .heading {
    align-items: end;
    border-bottom: 1px solid var(--sf-line);
    padding-bottom: 1.2rem;
}

.electronics .heading .title,
.for-you .heading .title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 750;
}

.sf-section-heading h2 {
    margin: 0;
    font-size: 2.7rem;
    font-weight: 750;
}

.sf-section-heading > a,
.sf-promotion-strip a {
    color: var(--sf-primary);
    font-weight: 700;
}

.sf-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.2rem;
}

.sf-category-card {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 88px;
    padding: 1rem;
    border: 1px solid var(--sf-line);
    border-radius: var(--sf-radius);
    color: var(--sf-ink);
    background: #fff;
    transition: border-color .2s ease, transform .2s ease;
}

.sf-category-card:hover {
    color: var(--sf-primary);
    border-color: #9bbcf2;
    transform: translateY(-2px);
}

.sf-category-card__image {
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--sf-soft);
}

.sf-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sf-category-card strong {
    font-size: 1.25rem;
    line-height: 1.35;
}

.sf-promotion-strip {
    padding: 1.2rem 0 2rem;
}

.sf-promotion-strip__content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.2rem;
    padding: 1.6rem 1.8rem;
    border-left: 4px solid var(--sf-accent);
    background: #fff8f4;
}

.sf-promotion-strip__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--sf-accent);
    font-size: 2rem;
}

.sf-promotion-strip__content strong {
    display: block;
    color: var(--sf-ink);
    font-size: 1.55rem;
}

/* One product-card foundation across showcases, catalog and campaigns. */
.sf-product-card,
.catalog-product,
.promo-product,
.electronics .product,
.for-you .product {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sf-line) !important;
    border-radius: var(--sf-radius) !important;
    background: #fff !important;
    box-shadow: none !important;
}

.sf-product-card:hover,
.catalog-product:hover,
.promo-product:hover,
.electronics .product:hover,
.for-you .product:hover {
    border-color: #b7c8df !important;
    box-shadow: var(--sf-shadow) !important;
}

.sf-product-card .product-media,
.catalog-product .product-media,
.promo-product .product-media,
.electronics .product .product-media,
.for-you .product .product-media {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--sf-soft) !important;
}

.sf-product-card .product-media > a:not(.btn-product-compare--corner),
.catalog-product .product-media > a:not(.btn-product-compare--corner),
.promo-product .product-media > a:not(.btn-product-compare--corner),
.electronics .product .product-media > a:not(.btn-product-compare--corner),
.for-you .product .product-media > a:not(.btn-product-compare--corner) {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.sf-product-card .product-media img,
.catalog-product .product-image,
.catalog-product .product-image-hover,
.promo-product .product-media img,
.electronics .product .product-media img,
.for-you .product .product-media img {
    display: block;
    width: 100%;
    height: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: contain !important;
    object-position: center;
}

.sf-product-card .product-body,
.catalog-product .product-body,
.promo-product .product-body,
.electronics .product .product-body,
.for-you .product .product-body {
    flex: 1 1 auto;
    width: 100%;
    padding: 1.25rem !important;
}

.catalog-hero,
.catalog-toolbox,
.catalog-sidebar,
.product-gallery-card,
.product-details-card,
.product-description-card,
.cart-card,
.checkout-panel,
.checkout-summary-card,
.checkout-login-card {
    border-color: var(--sf-line) !important;
    border-radius: var(--sf-radius) !important;
    box-shadow: none !important;
}

.catalog-hero {
    background: var(--sf-soft) !important;
}

.cart-ajax-message,
.checkout-warning,
.alert {
    scroll-margin-top: 110px;
}

@media (max-width: 1199px) {
    .sf-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .sf-home-section { padding-top: 2.4rem; }
    .sf-section-heading { align-items: center; }
    .sf-section-heading h2 { font-size: 2.2rem; }
    .sf-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
    .sf-category-card { grid-template-columns: 54px minmax(0, 1fr); min-height: 76px; padding: .8rem; }
    .sf-category-card__image { width: 54px; height: 54px; }
    .sf-category-card > i { display: none; }
    .sf-promotion-strip__content { grid-template-columns: auto 1fr; }
    .sf-promotion-strip__content > a { grid-column: 2; }
    .catalog-toolbox { align-items: stretch !important; }
    .catalog-toolbox .toolbox-right,
    .catalog-toolbox .toolbox-sort { width: 100%; }
    .catalog-toolbox .select-custom,
    .catalog-toolbox select { width: 100%; }
    .sf-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
    .sf-product-showcase { padding-top: 2.3rem; }
    .sf-product-card .product-body { padding: 1rem; }
    .sf-product-card .product-title { min-height: 4rem; }
    .sf-product-card .product-title a { font-size: 1.25rem; }
    .sf-delivery-note { display: none; }
    .sf-product-card .product-action { left: .6rem; right: .6rem; bottom: .6rem; }
    .sf-product-card .product-action { opacity: 1; visibility: visible; transform: none; }
    .sf-product-card .product-action .btn-cart { min-height: 42px; font-size: 1.05rem; }
}

@media (hover: none), (pointer: coarse) {
    .sf-product-card .product-action {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

/* Reuse the homepage showcase cards inside the filtered catalog. */
.catalog-product-grid.sf-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-product.sf-product-card {
    height: 100%;
    transform: none;
}

.catalog-product.sf-product-card:hover {
    transform: translateY(-2px);
}

.catalog-product.sf-product-card .product-media {
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: 1 / 1;
}

.catalog-product.sf-product-card .product-media > a:not(.btn-product-compare--corner) {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    background: transparent;
}

.catalog-product.sf-product-card .btn-product-compare--corner {
    top: .8rem;
    right: .8rem;
    left: auto;
    bottom: auto;
    z-index: 5;
    width: 42px !important;
    height: 42px !important;
    min-height: 42px;
    padding: 0 !important;
}

.catalog-product.sf-product-card .product-body {
    padding: 1.25rem;
}

.catalog-product.sf-product-card .product-action {
    left: .9rem;
    right: .9rem;
    bottom: .9rem;
    width: auto;
    padding: 0;
}

.catalog-product.sf-product-card .product-title {
    min-height: 4.5rem;
}

.catalog-product.sf-product-card .product-title a {
    font-size: 1.4rem;
    line-height: 1.45;
}

@media (max-width: 1199px) {
    .catalog-product-grid.sf-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .catalog-product-grid.sf-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-product.sf-product-card .product-body { padding: 1rem; }
    .catalog-product.sf-product-card .product-action { left: .6rem; right: .6rem; bottom: .6rem; }
}
/* Unified feedback messages */
:is(
  .alert,
  .cart-coupon-notice,
  .cart-ajax-message,
  .account-form-feedback,
  .account-returns-alert,
  .order-review-alert,
  .store-footer-newsletter-alert,
  .site-chat-notice,
  .replenishment-notice
) {
  --notice-accent: #2563eb;
  --notice-bg: #eff6ff;
  --notice-ink: #1e3a8a;
  position: relative;
  display: flex;
  min-height: 54px;
  margin: 0 0 1rem;
  padding: 1rem 1.15rem 1rem 3.75rem;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--notice-accent) 22%, transparent);
  border-left: 4px solid var(--notice-accent);
  border-radius: 14px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.55;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

:is(
  .alert,
  .cart-coupon-notice,
  .cart-ajax-message,
  .account-form-feedback,
  .account-returns-alert,
  .order-review-alert,
  .store-footer-newsletter-alert,
  .site-chat-notice,
  .replenishment-notice
)::before {
  content: "i";
  position: absolute;
  left: 1.1rem;
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--notice-accent);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  font-style: normal;
  line-height: 1;
}

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-success, [class*="--success"], .is-success) {
  --notice-accent: #059669;
  --notice-bg: #ecfdf5;
  --notice-ink: #065f46;
}

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-success, [class*="--success"], .is-success)::before { content: "\2713"; }

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-warning, [class*="--warning"], .is-warning) {
  --notice-accent: #d97706;
  --notice-bg: #fffbeb;
  --notice-ink: #92400e;
}

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-warning, [class*="--warning"], .is-warning)::before { content: "!"; }

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-danger, .alert-error, [class*="--error"], .is-error) {
  --notice-accent: #dc2626;
  --notice-bg: #fef2f2;
  --notice-ink: #991b1b;
}

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-danger, .alert-error, [class*="--error"], .is-error)::before { content: "!"; }

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-info, [class*="--info"], .is-info) {
  --notice-accent: #2563eb;
  --notice-bg: #eff6ff;
  --notice-ink: #1e3a8a;
}

:is(.alert, .cart-coupon-notice, .cart-ajax-message, .account-form-feedback, .account-returns-alert, .order-review-alert, .store-footer-newsletter-alert, .site-chat-notice, .replenishment-notice):is(.alert-light) {
  --notice-accent: #64748b;
  --notice-bg: #f8fafc;
  --notice-ink: #334155;
}

@media (max-width: 575px) {
  :is(
    .alert,
    .cart-coupon-notice,
    .cart-ajax-message,
    .account-form-feedback,
    .account-returns-alert,
    .order-review-alert,
    .store-footer-newsletter-alert,
    .site-chat-notice,
    .replenishment-notice
  ) {
    padding: .9rem 1rem .9rem 3.4rem;
    border-radius: 12px;
    font-size: 1.3rem;
  }
}
