/* ==========================================================
   D-Decor Fasty Pro v1.0
   Visual layer only — EasyOrders remains responsible for cart,
   quantities, inventory, checkout and orders.
   ========================================================== */

:root {
  --dd-navy-950: #050b1f;
  --dd-navy-900: #071126;
  --dd-navy-800: #0a1633;
  --dd-blue-700: #0745d9;
  --dd-blue-600: #0b57ef;
  --dd-blue-500: #1677ff;
  --dd-gold-400: #ffd66b;
  --dd-red-600: #d71920;
  --dd-ink: #101828;
  --dd-muted: #667085;
  --dd-line: #e6ebf2;
  --dd-surface: #ffffff;
  --dd-canvas: #f6f8fc;
  --dd-radius: 18px;
  --dd-shadow: 0 10px 30px rgba(7, 17, 38, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--dd-ink);
  background:
    radial-gradient(circle at 50% 0, rgba(22, 119, 255, 0.06), transparent 420px),
    var(--dd-canvas);
}

/* ---------- Announcement ---------- */
.dd-pro-announcement {
  position: relative;
  z-index: 40;
  width: 100%;
  overflow: hidden;
  direction: rtl;
  color: #fff;
  background:
    radial-gradient(circle at 50% -160%, rgba(89, 155, 255, 0.95), transparent 63%),
    linear-gradient(100deg, var(--dd-navy-950), var(--dd-blue-600) 50%, var(--dd-navy-950));
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 18px rgba(5, 11, 31, 0.16);
}

.dd-pro-announcement__inner {
  width: min(100% - 24px, 1240px);
  min-height: 50px;
  margin: 0 auto;
  padding: 7px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.dd-pro-announcement__brand {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.dd-pro-announcement__divider {
  width: 1px;
  height: 24px;
  flex: 0 0 1px;
  background: rgba(255, 255, 255, 0.34);
}

.dd-pro-announcement__offer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.dd-pro-announcement__offer strong {
  color: var(--dd-gold-400);
  font-weight: 900;
}

/* ---------- Header ---------- */
.fasty_header {
  z-index: 35;
  color: var(--dd-ink);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--dd-line);
  box-shadow: 0 6px 22px rgba(7, 17, 38, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fasty_header_container {
  padding-right: 18px !important;
  padding-left: 18px !important;
}

.fasty_header_container > div {
  height: 70px !important;
  min-height: 70px !important;
}

.fasty_header_logo {
  margin: 0 !important;
  padding: 4px !important;
}

.fasty_header_logo a {
  width: 72px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fasty_header_logo img {
  width: auto !important;
  max-width: 72px !important;
  max-height: 58px !important;
  object-fit: contain !important;
}

.fasty_header_logo .logo-text-shadow-outline {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
}

.fasty_header button,
.fasty_header a {
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.fasty_header button:active,
.fasty_header a:active {
  transform: scale(0.96);
}

/* Hide wishlist if a future Fasty update renders it again. */
.fasty_header a[href="/wishlist"],
.fasty_product_card_wishlist_btn {
  display: none !important;
}

/* ---------- Main layout ---------- */
main {
  padding-top: 18px !important;
}

.category_section_header {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 14px !important;
  padding: 8px 2px !important;
  align-items: center !important;
}

.category_section_header_title {
  position: relative;
  margin: 0 !important;
  padding: 0 0 8px !important;
  color: var(--dd-navy-950) !important;
  font-size: clamp(25px, 4vw, 36px) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em;
}

.category_section_header_title::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dd-blue-600), var(--dd-gold-400));
}

/* Remove the low-value default sorting control. */
.category_section_header > div.relative.z-10,
.category_section_header select {
  display: none !important;
}

.category_products_grid_container {
  margin-top: 0 !important;
  padding-top: 0 !important;
  align-items: stretch !important;
}

.category_products_grid_card,
.fasty_product_card {
  height: 100% !important;
}

/* ---------- Product cards ---------- */
.fasty_product_card {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: var(--dd-ink);
  background: var(--dd-surface) !important;
  border: 1px solid var(--dd-line) !important;
  border-radius: var(--dd-radius) !important;
  box-shadow: var(--dd-shadow) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

@media (hover: hover) {
  .fasty_product_card:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 119, 255, 0.32) !important;
    box-shadow: 0 16px 38px rgba(7, 17, 38, 0.13) !important;
  }
}

.fasty_product_card_img {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 auto !important;
  display: block !important;
  overflow: hidden !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  background:
    linear-gradient(145deg, rgba(22, 119, 255, 0.035), transparent 45%),
    #fff !important;
}

.fasty_product_card_img img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center !important;
  transition: transform 0.35s ease;
}

@media (hover: hover) {
  .fasty_product_card:hover .fasty_product_card_img img {
    transform: scale(1.025);
  }
}

.fasty_product_card_name {
  width: 100% !important;
  height: auto !important;
  min-height: 2.9em !important;
  max-height: none !important;
  margin: 9px 0 4px !important;
  padding: 0 10px !important;
  display: block !important;
  overflow: visible !important;
  color: var(--dd-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  text-align: center !important;
  white-space: normal !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

.fasty_product_card_price {
  min-height: 34px !important;
  margin: 2px 0 7px !important;
  padding: 0 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.fasty_product_card_price > span.text-red-400 {
  color: var(--dd-red-600) !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
}

.fasty_product_card_price > span.line-through,
.fasty_product_card_price > span.text-gray-400,
.fasty_product_card_price > span.text-gray-500 {
  color: #98a2b3 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

.fasty_product_card_price > span.absolute {
  top: 8px !important;
  right: 8px !important;
  left: auto !important;
  padding: 5px 9px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #ff5a62, var(--dd-red-600)) !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: 0 5px 14px rgba(215, 25, 32, 0.24) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.fasty_product_card_btn_container {
  width: 100% !important;
  margin-top: auto !important;
  padding: 4px 9px 10px !important;
}

.fasty_product_card_btn {
  width: 100% !important;
  min-height: 47px !important;
  padding: 8px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  color: #fff !important;
  background:
    linear-gradient(135deg, var(--dd-blue-700), var(--dd-blue-500)) !important;
  border: 1px solid rgba(7, 69, 217, 0.9) !important;
  border-radius: 12px !important;
  box-shadow: 0 7px 16px rgba(11, 87, 239, 0.2) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease !important;
}

.fasty_product_card_btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 9px 20px rgba(11, 87, 239, 0.28) !important;
}

.fasty_product_card_btn:active {
  transform: scale(0.98) !important;
}

.fasty_product_card_btn:disabled,
.fasty_product_card_btn[disabled] {
  color: #667085 !important;
  background: #e9edf3 !important;
  border-color: #e0e5ec !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* ---------- Product page ---------- */
.product_container {
  padding-top: 22px !important;
}

.product_container > div {
  gap: 24px !important;
}

.fasty_product_img {
  background: #fff !important;
  border: 1px solid var(--dd-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--dd-shadow) !important;
  object-fit: contain !important;
  object-position: center !important;
}

.product_name {
  color: var(--dd-navy-950) !important;
  font-weight: 900 !important;
  line-height: 1.45 !important;
}

.product_price_container,
.total_price_container {
  color: var(--dd-red-600) !important;
  font-weight: 900 !important;
}

.quantity_container {
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid var(--dd-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(7, 17, 38, 0.06) !important;
}

.quantity_btn {
  min-width: 42px !important;
  min-height: 42px !important;
  color: var(--dd-blue-700) !important;
  background: #f3f7ff !important;
  font-weight: 900 !important;
}

.checkout_btn,
.add_to_cart_btn,
.form_checkout_btn,
.checkout_buy_now {
  min-height: 50px !important;
  border-radius: 12px !important;
  font-family: inherit !important;
  font-weight: 900 !important;
}

.checkout_btn,
.form_checkout_btn,
.checkout_buy_now {
  color: #fff !important;
  background: linear-gradient(135deg, var(--dd-blue-700), var(--dd-blue-500)) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(11, 87, 239, 0.2) !important;
}

.checkout_buy_now {
  width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.checkout_buy_now:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--dd-blue-800), var(--dd-blue-600)) !important;
}

.checkout_buy_now:focus,
.checkout_buy_now:active,
.checkout_buy_now:disabled,
.checkout_buy_now[disabled],
.form_checkout_btn:focus,
.form_checkout_btn:active,
.form_checkout_btn:disabled,
.form_checkout_btn[disabled] {
  color: #fff !important;
  background: linear-gradient(135deg, var(--dd-blue-700), var(--dd-blue-500)) !important;
  border-color: transparent !important;
  opacity: 0.72 !important;
  visibility: visible !important;
}

.checkout_buy_now:disabled,
.checkout_buy_now[disabled],
.form_checkout_btn:disabled,
.form_checkout_btn[disabled] {
  cursor: not-allowed !important;
}

.add_to_cart_btn {
  color: var(--dd-blue-700) !important;
  background: #fff !important;
  border: 2px solid var(--dd-blue-600) !important;
}

.product_description,
.product_form_checkout {
  background: #fff !important;
  border: 1px solid var(--dd-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(7, 17, 38, 0.05) !important;
}

/* ---------- Inputs and checkout ---------- */
.global_input,
.global_textarea,
.gov_select {
  min-height: 48px !important;
  color: var(--dd-ink) !important;
  background: #fff !important;
  border: 1px solid #d6dde8 !important;
  border-radius: 11px !important;
  box-shadow: 0 2px 7px rgba(7, 17, 38, 0.025) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.global_input:focus,
.global_textarea:focus,
.gov_select:focus {
  border-color: var(--dd-blue-500) !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12) !important;
  outline: none !important;
}

.checkout_container:not(.checkout_form) {
  gap: 20px !important;
}

.checkout_order_summary,
.checkout_form {
  background: #fff !important;
  border: 1px solid var(--dd-line) !important;
  border-radius: 16px !important;
  box-shadow: var(--dd-shadow) !important;
}

.dd-checkout-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 11px 12px;
  color: var(--dd-navy-900);
  background: linear-gradient(135deg, #f4f8ff, #fffaf0);
  border: 1px solid #dce7fb;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.dd-checkout-trust span::first-letter {
  color: #0a9f62;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 34px;
  color: #eaf0ff !important;
  background:
    radial-gradient(circle at 50% 0, rgba(22, 119, 255, 0.18), transparent 55%),
    var(--dd-navy-950) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.default_footer {
  padding-top: 34px !important;
  padding-bottom: 34px !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.default_footer,
.default_footer a,
.default_footer_link,
.footer_store_info {
  color: #eaf0ff !important;
}

.default_footer a:hover,
.default_footer_link:hover {
  color: var(--dd-gold-400) !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .dd-pro-announcement__inner {
    width: calc(100% - 14px);
    min-height: 66px;
    padding: 6px 0;
    flex-direction: column;
    gap: 3px;
  }

  .dd-pro-announcement__brand {
    font-size: 12.5px;
  }

  .dd-pro-announcement__divider {
    width: 78px;
    height: 1px;
    flex-basis: 1px;
  }

  .dd-pro-announcement__offer {
    gap: 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .fasty_header_container {
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .fasty_header_container > div {
    height: 64px !important;
    min-height: 64px !important;
  }

  .fasty_header_logo a {
    width: 64px;
    height: 52px;
  }

  .fasty_header_logo img {
    max-width: 64px !important;
    max-height: 52px !important;
  }

  /* Search is low priority for this quick-shopping collection. */
  .fasty_header a[href="/search"] {
    display: none !important;
  }

  main {
    padding: 12px 9px 24px !important;
  }

  .category_section_header {
    margin-bottom: 10px !important;
    padding: 5px 3px 7px !important;
  }

  .category_section_header_title {
    font-size: 26px !important;
  }

  .category_products_grid_container {
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 8px !important;
    row-gap: 10px !important;
  }

  .fasty_product_card {
    border-radius: 15px !important;
    box-shadow: 0 7px 22px rgba(7, 17, 38, 0.075) !important;
  }

  .fasty_product_card_name {
    min-height: 2.8em !important;
    margin-top: 6px !important;
    padding: 0 6px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }

  .fasty_product_card_price {
    min-height: 29px !important;
    margin-bottom: 4px !important;
    padding: 0 5px !important;
    gap: 5px !important;
  }

  .fasty_product_card_price > span.text-red-400 {
    font-size: 17px !important;
  }

  .fasty_product_card_price > span.line-through,
  .fasty_product_card_price > span.text-gray-400,
  .fasty_product_card_price > span.text-gray-500 {
    font-size: 12px !important;
  }

  .fasty_product_card_price > span.absolute {
    top: 6px !important;
    right: 6px !important;
    padding: 4px 7px !important;
    border-radius: 9px !important;
    font-size: 11px !important;
  }

  .fasty_product_card_btn_container {
    padding: 3px 6px 7px !important;
  }

  .fasty_product_card_btn {
    min-height: 43px !important;
    padding: 6px 5px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  .product_container {
    padding: 12px 8px 22px !important;
  }

  .product_name {
    font-size: 20px !important;
  }

  /* Checkout: preserve Fasty's grid and move only its two direct children. */
  .checkout_container:not(.checkout_form) {
    gap: 12px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .checkout_container:not(.checkout_form) > .checkout_form {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    padding: 16px 10px 112px !important;
    border-radius: 14px !important;
  }

  .checkout_container:not(.checkout_form) > .checkout_order_summary {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    padding: 16px 10px 24px !important;
    border-radius: 14px !important;
  }

  .dd-checkout-trust {
    gap: 5px 10px;
    margin-bottom: 12px;
    padding: 9px 7px;
    font-size: 11px;
  }

  .checkout_form .global_input,
  .checkout_form .global_textarea,
  .checkout_form .gov_select {
    min-height: 46px !important;
  }

  .checkout_form .global_textarea {
    min-height: 112px !important;
  }

  .default_footer {
    padding: 28px 16px 96px !important;
  }
}

@media (max-width: 360px) {
  .dd-pro-announcement__brand {
    font-size: 11.5px;
  }

  .dd-pro-announcement__offer {
    gap: 5px;
    font-size: 10px;
  }

  .category_products_grid_container {
    column-gap: 6px !important;
  }

  .fasty_product_card_name,
  .fasty_product_card_btn {
    font-size: 12px !important;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 1280px) {
  .category_products_grid_container {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
