/* Shafaq 1.5.23 — storefront/header/footer/archive refinement shared by all layouts. */
:root{--ts-surface:#fff;--ts-surface-soft:#f7fafc;--ts-ink:#20334a;--ts-muted:#738195;--ts-line:#e2e9ef;--ts-card-shadow:0 10px 30px rgba(22,49,73,.055)}

/* Managed main navigation */
.ts-managed-header-nav{display:block;width:100%}
.ts-managed-header-nav>ul{display:flex;align-items:center;gap:24px;margin:0;padding:0;list-style:none;min-height:44px}
.ts-managed-header-nav>ul>li>a{display:flex;align-items:center;min-height:44px;font-weight:700}
.ts-managed-header-nav .ts-auto-category-menu>a:after{content:'⌄';font-size:11px;margin-right:5px;opacity:.8}
.ts-managed-header-nav .ts-auto-category-menu .sub-menu{display:none;grid-template-columns:repeat(2,minmax(160px,1fr));gap:4px;position:absolute;right:0;top:calc(100% - 1px);width:min(520px,82vw);padding:12px;background:#fff;border:1px solid var(--ts-line);border-radius:0 0 16px 16px;box-shadow:0 18px 45px rgba(20,42,65,.13);z-index:100}
.ts-managed-header-nav .ts-auto-category-menu:hover>.sub-menu,.ts-managed-header-nav .ts-auto-category-menu:focus-within>.sub-menu{display:grid}
.ts-managed-header-nav .ts-auto-category-menu .sub-menu a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-radius:9px;color:#33465c!important;font-size:11px}
.ts-managed-header-nav .ts-auto-category-menu .sub-menu a:hover{background:#f2f7fb}
.ts-managed-header-nav .ts-auto-category-menu .sub-menu small{font-size:9px;color:#8a96a5}

/* Home page surfaces: less dry, more card-based and consistent. */
.ts-home-slot>.ts-position:not(.ts-style-hero):not(.ts-style-announcement):not(.ts-style-banner-grid-2):not(.ts-style-banner-grid-3):not(.ts-style-banner-grid-4):not(.ts-style-wide-banner):not(.ts-style-medical-hero-services){border-radius:20px}
.ts-section-head{padding-inline:4px}
.ts-section-head h2{letter-spacing:-.25px}
.ts-category-carousel{position:relative;overflow:hidden;border-radius:18px}
.ts-category-carousel .ts-categories{padding:5px 12px 10px!important;scroll-padding-inline:12px}
.ts-category-carousel .ts-category-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.ts-category-carousel .ts-category-card:hover{transform:translateY(-2px)}
.ts-product-card{box-shadow:0 4px 16px rgba(23,45,67,.035)}
.ts-product-image{background:#f8fafc;border-radius:12px;padding:5px}
.ts-product-image img{mix-blend-mode:multiply}

/* Medical home: balanced hero, full-width service block on smaller screens, cleaner sections. */
body.ts-template-layout-medical-shafagh .ts-medical-hero-wrap{margin-top:18px}
body.ts-template-layout-medical-shafagh .ts-medical-hero-main .ts-hero-slider{aspect-ratio:4.2/1;min-height:250px;max-height:390px;background:#eef7fb}
body.ts-template-layout-medical-shafagh .ts-medical-hero-main .ts-banner img{min-height:0;height:100%;object-fit:cover}
body.ts-template-layout-medical-shafagh .ts-medical-slot>.ts-position:not(.ts-style-banner-grid-2){background:#fff;border:1px solid #e0eaf0;border-radius:22px;padding:17px;box-shadow:var(--ts-card-shadow)}
body.ts-template-layout-medical-shafagh .ts-medical-slot-med_home_categories>.ts-position{padding:10px 8px}
body.ts-template-layout-medical-shafagh .ts-medical-slot-med_home_banners_2a>.ts-position{background:transparent;border:0;padding:0;box-shadow:none}
body.ts-template-layout-medical-shafagh .ts-style-medical-brand-strip{padding:17px!important}
body.ts-template-layout-medical-shafagh .ts-style-service-strip{background:linear-gradient(135deg,#f7fcfe,#edf8fb)!important}
body.ts-template-layout-medical-shafagh .ts-medical-bottom-grid{margin-top:20px}
body.ts-template-layout-medical-shafagh .ts-medical-posts-col .ts-position{background:#fff;border:1px solid #e0eaf0;border-radius:22px;padding:16px;box-shadow:var(--ts-card-shadow)}
body.ts-template-layout-medical-shafagh .ts-medical-newsletter-col .ts-position{border-radius:22px;overflow:hidden}

/* Managed footer: one trust block only, all primary columns editable from Core. */
.ts-managed-footer{margin-top:34px;background:#fff;border-top:1px solid var(--ts-line);box-shadow:0 -8px 28px rgba(21,46,69,.025)}
.ts-managed-footer-intro{padding-top:24px;color:#4f6275;font-size:12px}
.ts-managed-footer-intro p{margin:0}
.ts-managed-footer-services{margin-top:16px}
.ts-managed-footer-grid{display:grid;grid-template-columns:1fr 1fr 1.25fr 1fr;gap:24px;padding-block:28px}
.ts-managed-footer-column{min-width:0}
.ts-managed-footer-column h2,.ts-managed-footer-column .ts-style-footer-block h2,.ts-managed-footer-column .ts-style-trust-block h2{margin:0 0 12px;font-size:15px;color:#23415f}
.ts-managed-footer-links{display:grid;gap:7px;margin:0;padding:0;list-style:none;font-size:11px}
.ts-managed-footer-links a{color:#526477;transition:color .15s ease}
.ts-managed-footer-links a:hover{color:var(--ts-accent)}
.ts-managed-footer-contact,.ts-managed-footer-trust{font-size:11px;color:#536578;line-height:2}
.ts-managed-footer-contact p,.ts-managed-footer-trust p{margin:.25em 0}
.ts-managed-footer-trust img{display:inline-block;width:auto;max-width:110px;max-height:110px;margin:4px}
.ts-managed-footer-trust .ts-position,.ts-managed-footer-contact .ts-position{margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
.ts-managed-footer-trust .ts-section-head,.ts-managed-footer-contact .ts-section-head{margin-bottom:8px}
.ts-managed-footer-social{padding-bottom:16px}
.ts-managed-footer-bottom p{margin:0;text-align:center;font-size:10px}

/* Shop/category archive — modern two-area layout with right-side filters. */
.ts-shop-archive-shell{display:grid;grid-template-columns:285px minmax(0,1fr);gap:20px;align-items:start;direction:rtl}
.ts-shop-products{grid-column:2;min-width:0;background:#fff;border:1px solid var(--ts-line);border-radius:22px;padding:18px;box-shadow:var(--ts-card-shadow)}
.ts-shop-sidebar{grid-column:1;grid-row:1;position:sticky;top:18px;display:grid;gap:12px;min-width:0}
.ts-shop-filter-toggle,.ts-shop-filter-close{display:none}
.ts-shop-sidebar-head{display:none}
.ts-filter-card{background:#fff;border:1px solid var(--ts-line);border-radius:17px;padding:14px 15px;box-shadow:0 7px 22px rgba(24,47,70,.04)}
.ts-filter-card h2{margin:0 0 11px;font-size:14px;color:#263f58}
.ts-filter-categories ul{display:grid;gap:4px;margin:0;padding:0;list-style:none}
.ts-filter-categories li a,.ts-filter-brand-list a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border-radius:9px;color:#53667a;font-size:11px}
.ts-filter-categories li a:hover,.ts-filter-brand-list a:hover,.ts-filter-categories li.is-current a{background:#edf7fb;color:#16708f}
.ts-filter-categories small,.ts-filter-brand-list small{font-size:9px;color:#8a96a5}
.ts-filter-categories .is-parent a{color:#69798a;border-bottom:1px dashed #dde5ec;border-radius:0;padding-bottom:10px;margin-bottom:3px}
.ts-price-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ts-price-fields label{display:grid;gap:4px;color:#6c7c8e;font-size:10px}
.ts-price-fields input{width:100%;height:38px;border:1px solid #dfe6ed;border-radius:9px;padding:0 8px;background:#fbfcfd;font:inherit}
.ts-filter-price button{width:100%;margin-top:9px;height:39px;border:0;border-radius:10px;background:var(--ts-blue);color:#fff;font:inherit;font-size:11px;font-weight:800;cursor:pointer}
.ts-filter-brand-list{display:grid;gap:3px;max-height:270px;overflow:auto;scrollbar-width:thin}
.ts-filter-reset{display:block;text-align:center;padding:10px 12px;border:1px dashed #d8e1e9;border-radius:12px;background:#fff;color:#788697;font-size:10px}

/* Archive title/toolbar and product cards. */
.ts-shop-products .woocommerce-products-header{padding:3px 2px 14px;margin-bottom:12px;border-bottom:1px solid #edf1f4}
.ts-shop-products .woocommerce-products-header__title.page-title{margin:0 0 7px;font-size:25px;color:#203750}
.ts-shop-products .term-description{color:#718094;font-size:12px;line-height:2}
.ts-shop-products .term-description p{margin:.2em 0}
.ts-shop-products .woocommerce-result-count{font-size:10px;color:#7b8796;margin:8px 0 14px}
.ts-shop-products .woocommerce-ordering{margin:0 0 14px}
.ts-shop-products .woocommerce-ordering select{min-height:40px;border:1px solid #dfe6ed;border-radius:10px;background:#fbfcfd;padding:0 10px;font:inherit;font-size:11px}
.ts-shop-products .products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;clear:both}
.ts-shop-products ul.products::before,.ts-shop-products ul.products::after{display:none!important}
.ts-shop-products ul.products li.product{display:flex;flex-direction:column;float:none!important;width:auto!important;min-width:0;margin:0!important;padding:11px!important;border:1px solid #e5ebf0!important;border-radius:17px!important;background:#fff!important;box-shadow:none!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.ts-shop-products ul.products li.product:hover{transform:translateY(-3px);border-color:#d6e1e9!important;box-shadow:0 12px 28px rgba(22,45,67,.075)!important}
.ts-shop-products ul.products li.product a.woocommerce-LoopProduct-link{display:flex;flex-direction:column;min-width:0;flex:1}
.ts-shop-products ul.products li.product a img{width:100%!important;aspect-ratio:1/1;height:auto!important;object-fit:contain!important;padding:9px!important;margin:0 0 10px!important;border-radius:13px!important;background:#f8fafc!important}
.ts-shop-products .woocommerce-loop-product__title{font-size:12px!important;line-height:1.8!important;min-height:44px;padding:0!important;color:#2d4055}
.ts-shop-products .star-rating{font-size:10px!important;margin:4px 0!important}
.ts-shop-products .price{font-size:12px!important;font-weight:900!important;color:#1e8552!important;margin-top:auto!important}
.ts-shop-products .button{width:100%;margin-top:10px!important;text-align:center;font-size:10.5px!important;padding:9px 7px!important;background:var(--ts-accent)!important;color:#fff!important}
.ts-shop-products .product-category h2{font-size:13px!important;line-height:1.8}
.ts-shop-products .product-category mark{background:transparent;color:#8995a3}
.ts-shop-products .woocommerce-pagination{margin-top:22px}
.ts-shop-products .woocommerce-pagination ul{border:0!important;display:flex;gap:5px;justify-content:center}
.ts-shop-products .woocommerce-pagination li{border:0!important}.ts-shop-products .woocommerce-pagination a,.ts-shop-products .woocommerce-pagination span{display:grid!important;place-items:center;min-width:36px;height:36px;border:1px solid #dfe6ed;border-radius:9px!important;background:#fff;color:#536578}
.ts-shop-products .woocommerce-pagination .current{background:var(--ts-blue)!important;color:#fff!important;border-color:var(--ts-blue)!important}

@media(min-width:1550px){.ts-shop-archive-shell{grid-template-columns:300px minmax(0,1fr)}}

@media(max-width:1250px){
  .ts-shop-products .products{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

@media(max-width:1100px){
  .ts-managed-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ts-shop-archive-shell{grid-template-columns:250px minmax(0,1fr);gap:14px}
  .ts-shop-products .products{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.ts-template-layout-medical-shafagh .ts-medical-hero-services{width:100%!important;margin-top:12px!important}
  body.ts-template-layout-medical-shafagh .ts-med-hero-service-card{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px!important;width:100%}
  body.ts-template-layout-medical-shafagh .ts-med-hero-service-card p{padding:10px 8px 10px 34px;border:1px solid #e2edf2;border-radius:12px;background:#fff;font-size:11px}
}

@media(max-width:900px) and (min-width:768px){
  .ts-shop-archive-shell{grid-template-columns:225px minmax(0,1fr);gap:12px}
  .ts-shop-products .products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:767px){
  /* Complete hero image: never crop the desktop/mobile artwork. */
  .ts-hero-slider{min-height:0!important;aspect-ratio:16/7!important;background:#eef5f8}
  .ts-hero-slider .ts-banner,.ts-hero-slider .ts-banner picture{width:100%;height:100%}
  .ts-hero-slider .ts-banner img{width:100%!important;height:100%!important;min-height:0!important;object-fit:contain!important;background:#eef5f8}
  body.ts-template-layout-medical-shafagh .ts-medical-hero-main .ts-hero-slider{min-height:0!important;aspect-ratio:16/7!important;max-height:none}
  body.ts-template-layout-medical-shafagh .ts-medical-hero-main .ts-banner img{min-height:0!important;object-fit:contain!important}
  body.ts-template-layout-medical-shafagh .ts-medical-hero-services{position:static!important;left:auto!important;top:auto!important;transform:none!important;width:100%!important;margin:10px 0 0!important}
  body.ts-template-layout-medical-shafagh .ts-med-hero-service-card{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%!important;padding:8px!important;border-radius:15px!important;box-shadow:0 7px 22px rgba(17,70,102,.07)!important;background:#fff!important}
  body.ts-template-layout-medical-shafagh .ts-med-hero-service-card p{min-height:48px;margin:0!important;padding:8px 8px 8px 30px!important;display:flex;align-items:center;border:1px solid #e3edf2;border-radius:11px;background:#f8fcfd;font-size:10px!important;line-height:1.6}
  body.ts-template-layout-medical-shafagh .ts-med-hero-service-card p:before{left:6px!important;width:19px!important;height:19px!important;font-size:11px!important;top:50%!important;transform:translateY(-50%)}

  /* Homepage categories/cards: compact, intentional, no awkward oversized blocks. */
  body.ts-template-layout-medical-shafagh .ts-medical-slot>.ts-position:not(.ts-style-banner-grid-2){padding:10px!important;border-radius:16px!important}
  body.ts-template-layout-medical-shafagh .ts-category-carousel .ts-categories-medical-shortcuts{gap:9px!important;padding:4px 8px 8px!important}
  body.ts-template-layout-medical-shafagh .ts-category-carousel .ts-categories-medical-shortcuts .ts-category-card{flex-basis:116px!important;min-width:116px!important;padding:9px 6px!important;border-radius:14px!important}
  body.ts-template-layout-medical-shafagh .ts-category-carousel .ts-categories-medical-shortcuts .ts-category-image{width:70px!important;height:70px!important;border-radius:13px!important}
  body.ts-template-layout-medical-shafagh .ts-category-carousel .ts-categories-medical-shortcuts .ts-category-name{font-size:9.5px!important;line-height:1.55}
  body.ts-template-layout-medical-shafagh .ts-medical-bottom-grid{gap:10px!important}

  /* Managed footer becomes clean stacked cards. */
  .ts-managed-footer-intro{padding-top:16px;font-size:10.5px}
  .ts-managed-footer-grid{grid-template-columns:1fr!important;gap:9px!important;padding-block:15px!important}
  .ts-managed-footer-column{padding:12px 13px;border:1px solid #e7edf2;border-radius:14px;background:#fbfcfd}
  .ts-managed-footer-column h2,.ts-managed-footer-column .ts-style-footer-block h2,.ts-managed-footer-column .ts-style-trust-block h2{font-size:13px;margin-bottom:8px}
  .ts-managed-footer-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;font-size:10px}
  .ts-managed-footer-trust img{max-width:90px;max-height:90px}

  /* Shop filter becomes a proper mobile drawer; products stay two columns. */
  .ts-shop-archive-shell{display:block}
  .ts-shop-products{padding:11px;border-radius:16px}
  .ts-shop-products .woocommerce-products-header__title.page-title{font-size:20px}
  .ts-shop-products .products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .ts-shop-products ul.products li.product{padding:7px!important;border-radius:13px!important}
  .ts-shop-products ul.products li.product a img{padding:5px!important;border-radius:10px!important;margin-bottom:7px!important}
  .ts-shop-products .woocommerce-loop-product__title{font-size:10.5px!important;min-height:36px!important;line-height:1.65!important}
  .ts-shop-products .price{font-size:10px!important}.ts-shop-products .button{font-size:9px!important;padding:8px 3px!important}
  .ts-shop-filter-toggle{display:flex;align-items:center;justify-content:center;width:100%;min-height:42px;margin:0 0 10px;border:1px solid #dbe5ed;border-radius:12px;background:#fff;color:#28435d;font:inherit;font-size:11px;font-weight:800;box-shadow:0 5px 18px rgba(25,48,71,.045)}
  .ts-shop-sidebar{display:grid!important;position:fixed!important;z-index:10040;top:0!important;right:0;bottom:0;width:min(86vw,340px);max-width:340px;padding:12px;background:#f4f7fa;overflow-y:auto;transform:translateX(105%);transition:transform .22s ease;box-shadow:-18px 0 45px rgba(12,28,44,.2)}
  .ts-shop-sidebar.is-open{transform:none}
  .ts-shop-sidebar-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:-12px;z-index:2;margin:-12px -12px 0;padding:13px 14px;background:#fff;border-bottom:1px solid #e4e9ef}
  .ts-shop-filter-close{display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:10px;background:#f0f4f7;font-size:24px;line-height:1;color:#526477}
  body.ts-shop-filter-open:after{content:'';position:fixed;inset:0;z-index:10030;background:rgba(14,29,44,.42)}
}

body.woocommerce-shop .ts-woocommerce-shell,
body.tax-product_cat .ts-woocommerce-shell,
body.tax-product_tag .ts-woocommerce-shell,
body.post-type-archive-product .ts-woocommerce-shell{background:transparent;border:0;box-shadow:none;padding-inline:0;overflow:visible}

@media(max-width:480px){
  body.ts-template-layout-medical-shafagh .ts-med-hero-service-card{grid-template-columns:1fr!important}
  body.ts-template-layout-medical-shafagh .ts-med-hero-service-card p{width:100%!important;min-height:44px!important}
}
