/* OkulHediye V4: ONLY category mega panel, mobile category grid/logo, homepage featured-events. */
/* Desktop category mega panel: lives directly beneath the current navigation bar. */
@media (min-width: 992px) {
  .om-theme.oh-header-v2 #menu .ohv4-main-item { flex-grow:1.5; }
  .om-theme.oh-header-v2 #menu .ohv4-all-trigger { cursor:pointer; background:transparent; border:0; width:100%; }
  .om-theme.oh-header-v2 #menu .ohv4-main-item .ohv4-trigger-chevron {font-size:10px; margin-left:2px;}
  .om-theme.oh-header-v2 #menu .ohv4-mega {
    left:0;right:0;top:calc(100% - 1px);width:100%;
    max-height:min(82vh,680px);padding:16px;overflow-y:auto;
    border:1px solid #dfeaf4;border-radius:0 0 20px 20px;
    background:#fff;box-shadow:0 18px 44px #0b315226;
  }
  .om-theme.oh-header-v2 #menu .ohv4-mega-layout {
    display:grid;grid-template-columns:minmax(175px,1.08fr) minmax(0,3.5fr) minmax(190px,1.25fr);
    gap:13px;min-height:318px;align-items:stretch;
  }
  .om-theme.oh-header-v2 #menu .ohv4-mega-intro, .om-theme.oh-header-v2 #menu .ohv4-mega-sale {
    display:flex;flex-direction:column;align-items:flex-start;position:relative;overflow:hidden;
    padding:24px 18px;border-radius:18px;
  }
  .om-theme.oh-header-v2 #menu .ohv4-mega-intro {
    color:white;background:linear-gradient(145deg,#087fda,#08437e 75%,#072e58);
  }
  .om-theme.oh-header-v2 #menu .ohv4-mega-intro strong {font-weight:850;font-size:clamp(19px,2vw,28px);letter-spacing:-.4px;line-height:1.16;color:#fff;z-index:1}
  .om-theme.oh-header-v2 #menu .ohv4-mega-intro p {color:#f0f8ff;font-size:12px;line-height:1.55;max-width:180px;margin:13px 0 20px;z-index:1}
  .om-theme.oh-header-v2 #menu .ohv4-intro-art {order:2;margin:auto auto 9px;font-size:63px;line-height:1;filter:drop-shadow(0 8px 5px #001c3630);z-index:1}
  .om-theme.oh-header-v2 #menu .ohv4-intro-art span {font-size:43px;margin-left:-19px;vertical-align:bottom}
  .om-theme.oh-header-v2 #menu .ohv4-mega-intro>a,
  .om-theme.oh-header-v2 #menu .ohv4-mega-sale>a {display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 12px;border-radius:13px;text-align:center;font-size:12px;font-weight:800;margin-top:auto;position:relative;z-index:1}
  .om-theme.oh-header-v2 #menu .ohv4-mega-intro>a {background:#fff;color:#0a3e70}
  .om-theme.oh-header-v2 #menu .ohv4-mega-sale {background:linear-gradient(130deg,#fff2ef,#ffebe7);color:#112c51}
  .om-theme.oh-header-v2 #menu .ohv4-mega-sale strong {font-size:clamp(18px,1.8vw,25px);line-height:1.22;max-width:250px;font-weight:850;z-index:1}
  .om-theme.oh-header-v2 #menu .ohv4-mega-sale strong em {font-style:normal;color:#e23b30}
  .om-theme.oh-header-v2 #menu .ohv4-mega-sale p {font-size:12px;line-height:1.6;color:#3c526b;max-width:205px;margin:14px 0 20px;z-index:1}
  .om-theme.oh-header-v2 #menu .ohv4-promo-medal {font-size:64px;align-self:center;color:#ff9b25;margin:auto 0 12px}
  .om-theme.oh-header-v2 #menu .ohv4-mega-sale>a {color:white;background:#fb7300}
  .om-theme.oh-header-v2 #menu .ohv4-event-tiles {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(145px,1fr));gap:8px;align-items:stretch;min-width:0}
  .om-theme.oh-header-v2 #menu .ohv4-event-tile {
    display:flex;flex-direction:column;justify-content:center;align-items:center;gap:9px;
    min-width:0;min-height:145px;padding:10px 4px;border:1px solid #e5eaf0;
    border-radius:16px;box-shadow:0 3px 7px #0b325009;color:#102f56;text-align:center;
    background:linear-gradient(150deg,#fdfbff,#edf5fc);transition:transform .15s,border-color .15s,box-shadow .15s;
  }
  .om-theme.oh-header-v2 #menu .ohv4-event-tile:hover, .om-theme.oh-header-v2 #menu .ohv4-event-tile:focus-visible {
    transform:translateY(-3px);border-color:#87baf3;box-shadow:0 7px 17px #134e7f24;
  }
  .om-theme.oh-header-v2 #menu .ohv4-art {font-family:system-ui,'Segoe UI Emoji',sans-serif;display:flex;justify-content:center;align-items:center;font-size:clamp(30px,3.3vw,51px);line-height:1;min-height:65px;max-width:100%;white-space:nowrap}
  .om-theme.oh-header-v2 #menu .ohv4-art img {display:block;width:min(100%,95px);max-height:76px;object-fit:contain;border-radius:8px}
  .om-theme.oh-header-v2 #menu .ohv4-event-label {font-size:clamp(10px,1.1vw,13px);line-height:1.2;font-weight:800;overflow-wrap:anywhere}
  .om-theme.oh-header-v2 #menu .ohv4-tone-red {background:#fff1f1}.om-theme.oh-header-v2 #menu .ohv4-tone-rose {background:#fff1f6}
  .om-theme.oh-header-v2 #menu .ohv4-tone-blue {background:#f0f7ff}.om-theme.oh-header-v2 #menu .ohv4-tone-sky {background:#effaff}
  .om-theme.oh-header-v2 #menu .ohv4-tone-gold {background:#fff7e9}.om-theme.oh-header-v2 #menu .ohv4-tone-sand {background:#fff7ed}
  .om-theme.oh-header-v2 #menu .ohv4-tone-violet {background:#f6f1ff}.om-theme.oh-header-v2 #menu .ohv4-tone-mint {background:#edfff9}
  .om-theme.oh-header-v2 #menu .ohv4-tone-peach {background:#fff5ed}
  .om-theme.oh-header-v2 #menu .ohv4-other-nav {flex:0 0 auto;min-width:58px}
  .om-theme.oh-header-v2 #menu .ohv4-more-toggle {border:0;background:transparent;font-size:12px;font-weight:800;color:#102d51;padding:8px;cursor:pointer}
  .om-theme.oh-header-v2 #menu .ohv4-other-panel {left:auto;right:0;max-width:480px;width:48%;}
  .om-theme.oh-header-v2 .ohv4-mobile-categories {display:none!important}
}
@media (min-width: 992px) and (max-width:1400px) {
  .om-theme.oh-header-v2 #menu .ohv4-mega-layout {grid-template-columns:165px minmax(0,1fr) 177px;gap:8px}
  .om-theme.oh-header-v2 #menu .ohv4-event-tiles {grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
  .om-theme.oh-header-v2 #menu .ohv4-event-tile {padding:7px 3px;min-height:132px}
  .om-theme.oh-header-v2 #menu .ohv4-mega-intro,.om-theme.oh-header-v2 #menu .ohv4-mega-sale {padding:16px 12px}
}
/* Mobile: preserve native 4-button bottom bar; remove only the unneeded upper support strip. */
@media (max-width: 991.98px) {
  .om-theme.oh-header-v2 .ohv4-mega,.om-theme.oh-header-v2 #menu .oh-nav-list {display:none!important}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-categories {display:block!important;padding:12px 4px 18px}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-panel-heading {display:flex;align-items:center;justify-content:space-between;padding:10px 10px 14px;color:#092d54}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-panel-heading strong {font-size:16px}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-panel-heading button {border:0;border-radius:9px;padding:8px 11px;background:#edf4fa;color:#173c64}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-category-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .om-theme.oh-header-v2 #menu a.ohv4-mobile-cat {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:107px;border-radius:15px;padding:12px 7px;border:1px solid #e5edf4;color:#092d54;font-weight:800;font-size:12px;text-align:center;box-shadow:0 3px 7px #0b39610b}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-cat i {font-size:31px;color:#0867b6}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-tone-rose{background:#fff0f3}.om-theme.oh-header-v2 #menu .ohv4-mobile-tone-rose i{color:#e04e61}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-tone-orange{background:#fff4e9}.om-theme.oh-header-v2 #menu .ohv4-mobile-tone-orange i{color:#ed7d13}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-tone-sky{background:#edf8ff}.om-theme.oh-header-v2 #menu .ohv4-mobile-tone-violet{background:#f7f1ff}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-tone-gold{background:#fff7e9}.om-theme.oh-header-v2 #menu .ohv4-mobile-tone-gold i{color:#e28b0a}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-tone-pink{background:#fff0fa}.om-theme.oh-header-v2 #menu .ohv4-mobile-tone-pink i{color:#c93f90}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-tone-mint{background:#eaffe9}.om-theme.oh-header-v2 #menu .ohv4-mobile-tone-peach{background:#fff1e8}
  .om-theme.oh-header-v2 .oh-nav-collapse.show {display:block!important}
}
@media (max-width: 767.98px) {
  .om-theme.oh-header-v2 .oh-topbar {display:none!important}
  .om-theme.oh-header-v2 .oh-header-row {display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:5px!important;min-height:0!important;padding:6px 0 10px!important}
  .om-theme.oh-header-v2 .oh-header-row>.oh-logo {
    grid-column:1!important;grid-row:1!important;display:flex!important;align-items:center!important;justify-content:center!important;
    justify-self:center!important;position:relative!important;overflow:visible!important;
    width:min(100%,270px)!important;max-width:270px!important;height:77px!important;aspect-ratio:auto!important;margin:0 auto!important;
  }
  .om-theme.oh-header-v2 .oh-header-row>.oh-logo img {
    position:static!important;display:block!important;width:100%!important;height:100%!important;
    max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;
    margin:0!important;transform:none!important;
  }
  .om-theme.oh-header-v2 .oh-header-row>.oh-header-search {grid-column:1!important;grid-row:2!important;width:100%!important}
  .om-theme.oh-header-v2 .oh-header-row>.oh-header-actions {display:none!important}
  .om-theme.oh-header-v2 .oh-nav-region {margin-bottom:10px!important}
  .om-theme.oh-header-v2 #menu .ohv4-mobile-category-grid {gap:8px}
  .om-theme.oh-header-v2 #menu a.ohv4-mobile-cat {min-height:105px;font-size:11.5px}
  .om-theme.oh-header-v2 .om-mobile-nav {display:flex!important}
  .om-theme.oh-header-v2 .om-mobile-nav>a,.om-theme.oh-header-v2 .om-mobile-nav>button {width:25%!important}
}
/* Homepage feature block appears immediately AFTER the site's existing top/banner module. */
.om-theme .ohv4-featured {margin:22px 0 29px;padding:0;}
.om-theme .ohv4-featured-title {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.om-theme .ohv4-featured-title h2 {font-size:clamp(19px,2.1vw,27px);font-weight:850;color:#092e56;line-height:1.2;margin:0;display:flex;align-items:center;gap:9px}
.om-theme .ohv4-featured-title h2 i {color:#0c82c4}
.om-theme .ohv4-featured-title a {display:flex;align-items:center;gap:8px;font-weight:800;color:#f26b00;font-size:12px;white-space:nowrap}
.om-theme .ohv4-featured-grid {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}
.om-theme a.ohv4-featured-card {display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:10px;text-align:center;min-width:0;min-height:148px;border-radius:15px;border:1px solid #e4edf5;background:#fff;box-shadow:0 5px 13px #0738610e;padding:10px 8px;color:#092e56}
.om-theme a.ohv4-featured-card:hover,.om-theme a.ohv4-featured-card:focus-visible{border-color:#80bfe9;box-shadow:0 8px 17px #0738611a;transform:translateY(-2px)}
.om-theme .ohv4-featured-art {display:flex;align-items:center;justify-content:center;width:100%;min-height:83px;border-radius:11px;font-size:53px;line-height:1.2;background:linear-gradient(140deg,#eff8ff,#fff4ed);font-family:system-ui,'Segoe UI Emoji',sans-serif}
.om-theme .ohv4-featured-art img {width:100%;height:78px;object-fit:contain;border-radius:9px}
.om-theme .ohv4-featured-label{font-size:13px;font-weight:800;line-height:1.25;overflow-wrap:anywhere}
@media(max-width:991.98px){.om-theme .ohv4-featured-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}}
@media(max-width:767.98px){
 .om-theme .ohv4-featured {margin:18px 0 24px}
 .om-theme .ohv4-featured-title {margin-bottom:13px;align-items:flex-start}
 .om-theme .ohv4-featured-title h2 {font-size:18px;gap:6px}
 .om-theme .ohv4-featured-title a {font-size:10px;gap:3px}
 .om-theme .ohv4-featured-grid {
   display:grid!important;grid-auto-flow:column;grid-template-rows:repeat(2,minmax(0,1fr));
   grid-template-columns:none;grid-auto-columns:calc((100% - 24px)/4);gap:9px 8px;
   overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin;padding:2px 2px 12px;
 }
 .om-theme a.ohv4-featured-card {min-height:98px;gap:4px;padding:6px 3px;border-radius:11px;scroll-snap-align:start}
 .om-theme .ohv4-featured-art {min-height:49px;font-size:29px;border-radius:7px}
 .om-theme .ohv4-featured-art img {height:49px}
 .om-theme .ohv4-featured-label {font-size:10px;line-height:1.12}
}
@media(prefers-reduced-motion:reduce){.om-theme .ohv4-featured-card{transition:none!important}}
/* On narrow screens, fill the visible two rows in natural reading order
   (29 Ekim, 23 Nisan, 10 Kasım, Öğretmenler Günü; then the next four). */
@media (max-width: 767.98px) {
 .om-theme .ohv4-featured-card:nth-child(1){order:1}
 .om-theme .ohv4-featured-card:nth-child(2){order:3}
 .om-theme .ohv4-featured-card:nth-child(3){order:5}
 .om-theme .ohv4-featured-card:nth-child(4){order:7}
 .om-theme .ohv4-featured-card:nth-child(5){order:2}
 .om-theme .ohv4-featured-card:nth-child(6){order:4}
 .om-theme .ohv4-featured-card:nth-child(7){order:6}
 .om-theme .ohv4-featured-card:nth-child(8){order:8}
 .om-theme .ohv4-featured-card:nth-child(9){order:9}
}

/* OkulHediye V5.4 | Desktop: tum ana kategoriler ust cubukta.
   The old 9-item cutoff and 'Diger' overflow menu were removed in menu.twig.
   Only nav layout is overridden; events mega panel and mobile menu are untouched. */
@media (min-width: 992px) {
  .om-theme.oh-header-v2 .oh-nav-region .oh-nav-container {
    max-width: 1600px !important;
    width: 100%;
    padding-left: clamp(9px, 1.15vw, 20px);
    padding-right: clamp(9px, 1.15vw, 20px);
  }
  .om-theme.oh-header-v2 #menu .oh-nav-list {
    display: grid !important;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 2px !important;
    align-items: stretch;
    width: 100%;
  }
  .om-theme.oh-header-v2 #menu .oh-nav-item {
    min-width: 0 !important;
    width: auto;
    flex: none !important;
    margin: 5px 0;
  }
  .om-theme.oh-header-v2 #menu .oh-nav-item .oh-nav-link {
    font-size: clamp(9px, .72vw, 11px) !important;
    line-height: 1.13;
    gap: 3px !important;
    height: 66px;
    min-height: 66px;
    padding: 5px 0 !important;
  }
  .om-theme.oh-header-v2 #menu .oh-nav-link > i {
    font-size: 18px !important;
    line-height: 20px;
  }
  .om-theme.oh-header-v2 #menu .oh-nav-title {
    overflow-wrap: anywhere;
    text-wrap: balance;
    min-width: 0;
  }
  .om-theme.oh-header-v2 #menu .oh-subtoggle {
    flex: 0 0 12px;
    width: 12px;
    padding: 0 1px !important;
    font-size: 8px !important;
  }
  .om-theme.oh-header-v2 #menu .ohv4-all-trigger {
    padding: 5px 2px !important;
  }
}
/* V5.4.1: ALL desktop widths use exactly ONE row of 14 category items.
   In the 992-1199px range, only spacing/icon sizes shrink; never wrap to row 2. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .om-theme.oh-header-v2 .oh-nav-region .oh-nav-container {padding-left:8px!important;padding-right:8px!important}
  .om-theme.oh-header-v2 #menu .oh-nav-list {grid-template-columns:repeat(14,minmax(0,1fr))!important;gap:1px!important}
  .om-theme.oh-header-v2 #menu .oh-nav-item .oh-nav-link {font-size:9px!important;line-height:1.12;gap:2px!important;padding:5px 1px!important}
  .om-theme.oh-header-v2 #menu .oh-nav-link > i {font-size:16px!important;line-height:18px}
  .om-theme.oh-header-v2 #menu .oh-nav-item .oh-subtoggle {flex-basis:9px;width:9px;padding:0!important;font-size:8px!important}
  .om-theme.oh-header-v2 #menu .oh-nav-title {overflow-wrap:anywhere;hyphens:auto}
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .om-theme.oh-header-v2 #menu .oh-nav-list {grid-template-columns:repeat(14,minmax(0,1fr))!important;gap:2px!important}
  .om-theme.oh-header-v2 #menu .oh-nav-item .oh-nav-link {font-size:10px!important}
}

/* OkulHediye L1: mobile logo fit only; preserve the original image. */
@media (max-width: 767.98px) {
  .om-theme.oh-header-v2 .oh-header-row > .oh-logo {
    width: 100% !important;
    max-width: 480px !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    margin: 0 auto !important;
  }
  .om-theme.oh-header-v2 .oh-header-row > .oh-logo > img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 !important;
    transform: none !important;
  }
}

/* OkulHediye L2: reduce only mobile logo image whitespace; keeps L1 width.
   Original 720x241 artwork has ~46px transparent space above/below.
   Negative margins reclaim 39.6px per side at source scale, without clipping.
   Percent margins scale with the displayed image width. */
@media (max-width: 767.98px) {
  .om-theme.oh-header-v2 .oh-header-row > .oh-logo > img {
    margin-top: -5.5% !important;
    margin-bottom: -5.5% !important;
  }
}

/* R1: exactly three native radio cards, one row on desktop and mobile. */
#product-info .om-option-radio > .mb-3 > div[id^="input-option-"]:has(> .form-check:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
#product-info .om-option-radio > .mb-3 > div[id^="input-option-"]:has(> .form-check:nth-child(3):last-child) > .form-check > .form-check-label {
  min-width: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  flex-wrap: wrap;
}
@media (max-width: 767px) {
  #product-info .om-option-radio > .mb-3 > div[id^="input-option-"]:has(> .form-check:nth-child(3):last-child) {
    gap: 6px;
  }
  #product-info .om-option-radio > .mb-3 > div[id^="input-option-"]:has(> .form-check:nth-child(3):last-child) > .form-check > .form-check-label {
    min-height: 92px;
    padding: 25px 5px 10px;
    font-size: 12px;
    line-height: 1.4;
  }
  #product-info .om-option-radio > .mb-3 > div[id^="input-option-"]:has(> .form-check:nth-child(3):last-child) > .form-check > .form-check-input {
    top: 8px;
    right: 8px;
  }
  #product-info .om-option-radio > .mb-3 > div[id^="input-option-"]:has(> .form-check:nth-child(3):last-child) > .form-check > .form-check-label img {
    max-width: 100%;
  }
}
