/*
Theme Name: Storefront Child
Template: storefront
Version: 1.0.11
Text Domain: storefront-child
*/

/*
  Kitabyahki brand override for Storefront
  Primary: #bd3e2e
  Secondary: #f5ca6b
*/

/* Base */
:root {
  --kby-primary: #bd3e2e;
  --kby-primary-dark: #9f3225;
  --kby-primary-soft: #f8e3df;
  --kby-secondary: #f5ca6b;
  --kby-secondary-dark: #d79c23;
  --kby-secondary-soft: #fbf0cf;
  --kby-ink: #221916;
  --kby-text: #352a26;
  --kby-muted: #76665f;
  --kby-border: #e7e0d9;
  --kby-surface: #fffaf4;
  --kby-surface-strong: #fff6e9;
  --kby-white: #ffffff;
  --kby-shadow: 0 10px 30px rgba(189, 62, 46, 0.08);
  --kby-shadow-strong: 0 18px 42px rgba(76, 43, 32, 0.1);
  --kby-font-body: "Noto Naskh Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --kby-font-heading: "Noto Naskh Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--kby-text) !important;
  background: linear-gradient(180deg, #fffdf9 0%, #fff7ed 52%, #fffaf4 100%) !important;
  font-family: var(--kby-font-body) !important;
  font-size: 16px;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.rtl,
.rtl body {
  direction: rtl;
  text-align: right;
}

a {
  color: var(--kby-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--kby-primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--kby-ink) !important;
  font-family: var(--kby-font-heading) !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  line-height: 1.35;
}

p {
  color: var(--kby-muted) !important;
}

.site {
  background: transparent;
}

/* Top bar / header */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--kby-border);
  box-shadow: 0 12px 32px rgba(70, 36, 28, 0.05);
}

.storefront-primary-navigation {
  background: rgba(255, 250, 244, 0.94);
  border-top: 1px solid var(--kby-border);
  border-bottom: 1px solid var(--kby-border);
}

.site-branding {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.custom-logo-link img,
.site-header .custom-logo {
  max-height: 72px;
  width: auto;
}

.site-title,
.site-title a {
  color: var(--kby-primary);
  font-weight: 800;
}

.site-description {
  color: var(--kby-muted);
  font-size: 0.95rem;
}

.main-navigation ul li a {
  color: var(--kby-ink) !important;
  font-family: var(--kby-font-body) !important;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item>a,
.main-navigation ul li.current_page_item>a {
  color: var(--kby-primary);
}

.main-navigation ul.menu>li>a {
  padding: 0.95rem 1rem;
  position: relative;
}

.main-navigation ul.menu>li>a::after {
  background: var(--kby-secondary);
  border-radius: 999px;
  bottom: 0.75rem;
  content: "";
  height: 3px;
  inset-inline: 1rem;
  opacity: 0;
  position: absolute;
  transform: scaleX(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-navigation ul.menu>li>a:hover::after,
.main-navigation ul.menu>li.current-menu-item>a::after,
.main-navigation ul.menu>li.current_page_item>a::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (min-width: 769px) {
  .storefront-primary-navigation .col-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .storefront-primary-navigation .main-navigation {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    flex: 1 1 auto;
  }

  .storefront-primary-navigation .main-navigation ul.menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    width: auto;
  }

  .site-header-cart {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    flex: 0 0 auto;
  }

  .site-header-cart .cart-contents {
    display: flex !important;
    align-items: center;
    gap: 0.45rem;
    color: var(--kby-ink);
    font-weight: 700;
    height: auto !important;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
    white-space: nowrap;
  }
}

/* Search */
.woocommerce-product-search,
.widget_product_search form {
  border: 1px solid var(--kby-border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--kby-white);
  box-shadow: var(--kby-shadow);
}

.woocommerce-product-search input.search-field,
.widget_product_search input.search-field {
  border: 0;
  background: transparent;
  padding: 0.9rem 1rem;
}

.woocommerce-product-search button,
.widget_product_search button {
  background: var(--kby-primary);
  color: #fff;
  border: 0;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
}

.woocommerce-product-search button:hover,
.widget_product_search button:hover {
  background: var(--kby-primary-dark);
}

/* Buttons */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
a.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.added_to_cart,
.single_add_to_cart_button {
  background: var(--kby-primary) !important;
  color: #fff !important;
  border-radius: 10px;
  border: 1px solid var(--kby-primary) !important;
  box-shadow: 0 8px 18px rgba(189, 62, 46, 0.16);
  font-family: var(--kby-font-body) !important;
  font-weight: 800;
  transition: all 0.2s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
a.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.added_to_cart:hover,
.single_add_to_cart_button:hover {
  background: var(--kby-primary-dark) !important;
  border-color: var(--kby-primary-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.checkout-button {
  background: var(--kby-secondary) !important;
  color: var(--kby-ink) !important;
  border-color: var(--kby-secondary) !important;
}

.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.checkout-button:hover {
  background: var(--kby-secondary-dark) !important;
  border-color: var(--kby-secondary-dark) !important;
  color: #222 !important;
}

/* Links and notices */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
  border-radius: 12px;
  box-shadow: var(--kby-shadow);
}

.woocommerce-info {
  background: #fff7e7;
  border-top-color: var(--kby-secondary);
}

.woocommerce-message {
  background: #f4fff4;
  border-top-color: #66b266;
}

.woocommerce-error {
  background: #fff2f2;
  border-top-color: #d64545;
}

/* Content cards */
.hentry,
.page,
.product,
.widget,
.site-main .woocommerce-products-header,
.woocommerce-breadcrumb,
.storefront-breadcrumb,
.woocommerce-tabs,
.related.products,
.up-sells,
.cross-sells {
  border-radius: 18px;
}

.site-main .woocommerce-products-header,
.woocommerce-breadcrumb,
.storefront-breadcrumb {
  background: rgba(255, 250, 244, 0.88);
  border: 1px solid var(--kby-border);
  padding: 1rem 1.25rem;
  box-shadow: var(--kby-shadow);
}

.content-area .site-main>.hentry,
.content-area .site-main>.page {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--kby-border);
  box-shadow: var(--kby-shadow-strong);
  padding: 1.5rem;
}

.shop-archive-intro>.woocommerce-products-header {
  margin-bottom: 2rem;
  padding: 3rem 3.5rem;
}

.shop-archive-intro>.woocommerce-products-header .woocommerce-products-header__title,
.shop-archive-intro>.woocommerce-products-header .page-title {
  margin-bottom: 1.1rem;
}

.shop-archive-intro>.woocommerce-products-header .page-description,
.shop-archive-intro>.woocommerce-products-header .term-description {
  max-width: 760px;
  margin-inline: auto;
}

/* Shop / products */
ul.products li.product,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: #fff;
  border: 1px solid var(--kby-border);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--kby-shadow-strong);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

ul.products li.product:hover,
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(189, 62, 46, 0.12);
}

ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.08rem;
  font-family: var(--kby-font-heading) !important;
  font-weight: 800 !important;
  line-height: 1.5;
  color: var(--kby-ink) !important;
}

ul.products li.product .price,
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--kby-primary) !important;
  font-family: var(--kby-font-body) !important;
  font-weight: 900 !important;
}

.wc-block-product-template .wc-block-components-product-button,
ul.products li.product a.button,
ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce-page ul.products li.product a.button,
.woocommerce-page ul.products li.product .add_to_cart_button {
  display: none !important;
}

.onsale {
  background: var(--kby-secondary);
  color: var(--kby-ink);
  border-radius: 999px;
  min-width: 3.2rem;
  min-height: 3.2rem;
  line-height: 3.2rem;
  box-shadow: var(--kby-shadow);
}

/* Product page */
.woocommerce div.product .product_title {
  color: var(--kby-ink);
  font-size: 2rem;
}

.woocommerce div.product .woocommerce-product-gallery,
.woocommerce div.product .summary {
  background: #fff;
  border: 1px solid var(--kby-border);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--kby-shadow);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  border: 1px solid var(--kby-border);
  border-radius: 12px;
  background: #fff;
  color: var(--kby-text);
  box-shadow: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--kby-primary);
  box-shadow: 0 0 0 3px rgba(189, 62, 46, 0.12);
  outline: none;
}

/* Cart / checkout */
table.shop_table {
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--kby-border);
  box-shadow: var(--kby-shadow);
}

.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout .col2-set,
.woocommerce-checkout #order_review {
  background: #fff;
  border: 1px solid var(--kby-border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: var(--kby-shadow);
}

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout #order_review_heading {
  color: var(--kby-primary);
}

/* Embedded POD checkout lives inside the product summary, so viewport-based
   Storefront checkout columns are too narrow even on tablet/desktop widths. */
#pod-product-checkout,
#pod-product-checkout .woocommerce,
#pod-product-checkout form.checkout,
#pod-product-checkout .col2-set,
#pod-product-checkout #customer_details,
#pod-product-checkout #order_review_heading,
#pod-product-checkout #order_review,
#pod-product-checkout .form-row,
#pod-product-checkout .form-row-first,
#pod-product-checkout .form-row-last {
  box-sizing: border-box;
  clear: both !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100%;
  width: 100% !important;
}

#pod-product-checkout form.checkout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#pod-product-checkout #order_review_heading {
  margin-bottom: 0;
}

#pod-product-checkout table.shop_table {
  table-layout: fixed;
  width: 100%;
}

#pod-product-checkout table.shop_table th,
#pod-product-checkout table.shop_table td {
  overflow-wrap: anywhere;
  word-break: normal;
}

#pod-product-checkout .select2-container {
  max-width: 100%;
  width: 100% !important;
}

#pod-product-checkout select,
#pod-product-checkout select#billing_state {
  /* appearance: none;
  -webkit-appearance: none;
  background-position: 0.9rem 50%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  height: 48px;
  line-height: 1.3;
  min-height: 48px;
  padding: 0 0.5rem 0 0.9rem; */
  padding: .6180469716em;
  background-color: #f2f2f2;
  color: #43454b;
  border: 0;
  -webkit-appearance: none;
  box-sizing: border-box;
  font-weight: 400;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .125);
}

#pod-product-checkout .woocommerce-privacy-policy-text {
  display: none;
}

#pod-product-checkout .payment_box {
  display: none !important;
}

#pod-product-checkout #place_order {
  background: #15803d !important;
  border-color: #15803d !important;
  box-shadow: 0 10px 22px rgba(21, 128, 61, 0.2);
  color: #fff !important;
}

#pod-product-checkout #place_order:hover,
#pod-product-checkout #place_order:focus {
  background: #166534 !important;
  border-color: #166534 !important;
  color: #fff !important;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #3a211b 0%, #241411 100%);
  color: #f8f1eb;
  margin-top: 3rem;
}

.site-footer .col-full {
  max-width: 1180px;
}

.site-footer .footer-widgets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.site-footer .footer-widgets::before,
.site-footer .footer-widgets::after {
  content: none;
}

.site-footer .footer-widgets .block {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0;
}

.site-footer a {
  color: var(--kby-secondary);
}

.site-footer a:hover {
  color: #fff;
}

.site-info {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  padding-top: 1.2rem;
  padding-bottom: 1.4rem;
  text-align: center;
}

/* Widgets */
.widget {
  background: rgba(255, 250, 244, 0.9);
  border: 1px solid var(--kby-border);
  box-shadow: var(--kby-shadow);
  padding: 1.2rem;
}

.site-footer .widget {
  height: 100%;
  margin: 0;
}

.widget-title,
.widget .widget-title {
  color: var(--kby-primary);
  border-bottom: 2px solid var(--kby-secondary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

/* Breadcrumbs */
.woocommerce-breadcrumb a,
.storefront-breadcrumb a {
  color: var(--kby-primary);
}

.woocommerce-breadcrumb,
.storefront-breadcrumb {
  color: var(--kby-muted);
}

/* RTL refinements */
.rtl .main-navigation ul li a,
.rtl .site-title,
.rtl .site-description,
.rtl .widget,
.rtl .entry-content,
.rtl .woocommerce div.product .summary {
  text-align: right;
}

.rtl .woocommerce-product-search button,
.rtl .widget_product_search button {
  border-radius: 0 999px 999px 0;
}

.rtl .woocommerce-product-search input.search-field,
.rtl .widget_product_search input.search-field {
  border-radius: 999px 0 0 999px;
}

.rtl .site-footer .footer-widgets {
  direction: rtl;
}

/* Coming soon / maintenance-like pages */
.page-template-template-blank .site,
.page-template-template-homepage .site-main,
.home .site-main {
  background: transparent;
}

.home .entry-title,
.page .entry-title {
  color: var(--kby-primary);
}

/* Small screens */
@media (max-width: 768px) {
  body:not(.single-product) .storefront-handheld-footer-bar {
    display: none;
  }

  .site-header {
    padding-top: 0 !important;
  }

  .site-branding {
    text-align: center;
  }

  .home .wp-block-woocommerce-product-collection {
    text-align: center;
  }

  .home .wp-block-woocommerce-product-collection .wc-block-product-template {
    justify-content: center;
    justify-items: center;
    margin-inline: auto;
    max-width: 100%;
    width: fit-content;
  }

  .home .wp-block-woocommerce-product-collection .wc-block-product {
    text-align: center;
  }

  .home .wp-block-woocommerce-product-collection .wp-block-post-title {
    font-size: 1.22rem !important;
    line-height: 1.22 !important;
    margin: 0.7rem auto 0.35rem;
    max-width: 13rem;
  }

  .home .wp-block-woocommerce-product-collection .wp-block-post-title a {
    color: var(--kby-primary) !important;
    display: inline-block;
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.22;
    text-decoration: none;
    text-decoration-color: rgba(189, 62, 46, 0.35);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  .home .wp-block-woocommerce-product-collection .wp-block-post-title a:hover,
  .home .wp-block-woocommerce-product-collection .wp-block-post-title a:focus {
    color: var(--kby-primary-dark) !important;
    text-decoration-color: var(--kby-secondary);
  }

  .home .wp-block-woocommerce-product-collection .wc-block-components-product-price {
    margin-top: 0.45rem;
    text-align: center;
  }

  .home .wp-block-woocommerce-product-collection .wc-block-components-product-price .woocommerce-Price-amount {
    align-items: center;
    background: var(--kby-secondary-soft);
    border: 1px solid rgba(215, 156, 35, 0.18);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(189, 62, 46, 0.08);
    color: var(--kby-primary) !important;
    display: inline-flex;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.45rem 0.8rem;
  }

  .storefront-handheld-footer-bar ul li.order-now>a {
    align-items: center;
    background: var(--kby-primary) !important;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(189, 62, 46, 0.16);
    color: #fff !important;
    display: flex;
    font-size: 0.88rem;
    font-weight: 800;
    height: 2.9rem;
    justify-content: center;
    line-height: 1.2;
    margin: 0.55rem 0.35rem;
    padding: 0.35rem 0.6rem;
    text-decoration: none;
    text-indent: 0;
    white-space: normal;
  }

  .storefront-handheld-footer-bar ul.columns-1 li.order-now {
    width: 100%;
  }

  .storefront-handheld-footer-bar ul li.order-now>a::before {
    content: none !important;
  }

  .storefront-handheld-footer-bar.kby-order-now-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .main-navigation ul.menu>li>a {
    padding: 0.8rem 0.9rem;
  }

  .content-area .site-main>.hentry,
  .content-area .site-main>.page {
    padding: 1rem;
  }

  .single-product .content-area .site-main>.product {
    padding: 0.05rem;
  }

  .single-product div.product {
    margin-bottom: 1rem;
  }

  .single-product .woocommerce div.product .woocommerce-product-gallery,
  .single-product .woocommerce div.product .summary,
  .single-product div.product>.woocommerce-product-gallery,
  .single-product div.product>.summary {
    padding: 0.75rem;
  }

  .single-product .woocommerce div.product .summary.entry-summary,
  .single-product div.product>.summary.entry-summary {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 1rem;
    padding: 0 !important;
  }

  .single-product .woocommerce-breadcrumb,
  .single-product .storefront-breadcrumb {
    padding: 0.8rem 0.9rem;
  }

  .single-product #tab-description h2 {
    margin-top: 0.30em;
  }

  .shop-archive-intro>.woocommerce-products-header {
    margin-bottom: 1.25rem;
    padding: 2rem 1.25rem;
  }

  .woocommerce div.product .product_title {
    font-size: 1.6rem;
  }

  #pod-product-checkout {
    margin-inline: -0.25rem;
  }

  #pod-product-checkout .woocommerce-checkout .col2-set,
  #pod-product-checkout .woocommerce-checkout #order_review {
    padding: 1rem;
  }

  ul.products li.product,
  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product {
    border-radius: 14px;
  }

  .site-footer .footer-widgets {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
}

/* Accessibility */
:focus-visible {
  outline: 3px solid rgba(189, 62, 46, 0.35);
  outline-offset: 2px;
}


/**/
.menu-toggle {
  border: 1px solid var(--kby-border);
  border-radius: 999px;
  background: var(--kby-white);
  box-shadow: var(--kby-shadow);
  margin-top: 1.35rem;
}