﻿/* =========================================
   Responsive — EME Könyvkiadó
   ========================================= */
/* =========================================
   360px — Small devices
   ========================================= */
@media (min-width: 360px) {
  .site-logo {
    width: 25%;
  }
}

/* =========================================
   480px — Small devices
   ========================================= */
@media (min-width: 480px) {
  header .site-name {
    font-size: 1.3rem;
    max-width: 370px;
    padding: 3.5em 0em 0em 0em;
  }
  .site-logo {
    width: auto;
  }
  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 640px) {
  .layout__region--second {
    order: 1 !important;
  }
}

/* =========================================
   768px — Tablets / medium screens
   ========================================= */
@media (min-width: 768px) {
  html {
    font-size: 17px;
  }

  /* Header */
  .header-top-container {
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  header .site-name {
    font-size: 1.5rem;
    max-width: 400px;
    padding: 2.5em 0em 0em 0em;
  }

  /* Search overlay */
  .header-search-close {
    top: 2rem;
  }
  .search-box-content .block-title {
    display: block;
  }

  /* Breadcrumb */
  .breadcrumb-item span {
    margin: 0 8px;
  }

  /* Footer */
  .footer-bottom-blocks-container {
    flex-direction: row;
    justify-content: space-between;
  }
  .footer-bottom-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Books grid 3-up on tablet */
  .books-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Shortcodes: content widths */
  .width30 { width: 30%; }
  .width40 { width: 40%; }
  .width50 { width: 50%; }
  .width60 { width: 60%; }
  .width70 { width: 70%; }
  .width80 { width: 80%; }
  .width90 { width: 90%; }

  /* Responsive flex columns */
  .w10 { flex-basis: calc(10% - 10px); }
  .w20 { flex-basis: calc(20% - 10px); }
  .w30 { flex-basis: calc(30% - 10px); }
  .w40 { flex-basis: calc(40% - 10px); }
  .w50 { flex-basis: calc(50% - 10px); }
  .w60 { flex-basis: calc(60% - 10px); }
  .w70 { flex-basis: calc(70% - 10px); }
  .w80 { flex-basis: calc(80% - 10px); }
  .w90 { flex-basis: calc(90% - 10px); }

  /* Show/hide helpers */
  .view-in-mobile { display: none; }
  .view-in-desktop { display: block; }
}

/* =========================================
   992px — Desktop
   ========================================= */
@media (min-width: 992px) {
  /* Main content grid layout */
  .main-container {
    display: grid;
    align-content: start;
    justify-items: start;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: auto;
    gap: 1.5rem;
  }

    /* Header right gap */
  .header-right {
    gap: 1rem;
    padding: 0;
  }
  
  .header .container::before {
    right: calc(100% - 130px);
    width: 50%;
    background-color: #eee9dd;
  }

  header .site-name {
    font-size: 1.5rem;
    max-width: 500px;
  }

  /* Sidebar column layout */
  #main {
    grid-row: 1 / 12;
    grid-column: 1 / span 8;
    width: 100%;
  }
  .no-sidebar #main {
    grid-column: 1 / span 12;
  }
  #sidebar-left {
    grid-row: auto;
    grid-column: 9 / span 4;
    width: 100%;
  }
  #sidebar-right {
    grid-row: auto;
    grid-column: 9 / span 4;
    width: 100%;
  }

  /* Navigation: horizontal menu */

  .region-primary-menu {
    display: flex;
    margin-left: calc(65px + 2em);
  }
  header .site-logo {
    margin-bottom: -40px;
    margin-top: 40px;
    top: 12px;
    z-index: 1;
  }
  header .site-name {
    font-size: 1.55rem;
    padding: 2.5em 1.5em 0em 1em;
  }
  .site-logo img {
    height: auto;
  }

  #block-emekiado-kosar {
    right: 54px;
    bottom: 40px;
  }
  #block-emekiado-kosar .cart-block--summary__icon,
  #block-emekiado-kosar .cart-block--summary__count {
    filter: brightness(0);
  }
  #block-emekiado-felhasznaloifiokmenuje {
    right: 3px;
    bottom: 40px;
  }
 #block-emekiado-felhasznaloifiokmenuje::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'%3E%3Cpath fill='%23000' d='M258.9 48C141.92 46.42 46.42 141.92 48 258.9c1.56 112.19 92.91 203.54 205.1 205.1 117 1.6 212.48-93.9 210.88-210.88C462.44 140.91 371.09 49.56 258.9 48zm126.42 327.25a4 4 0 01-6.14-.32 124.27 124.27 0 00-32.35-29.59C321.37 329 289.11 320 256 320s-65.37 9-90.83 25.34a124.24 124.24 0 00-32.35 29.58 4 4 0 01-6.14.32A175.32 175.32 0 0180 259c-1.63-97.31 78.22-178.76 175.57-179S432 158.81 432 256a175.32 175.32 0 01-46.68 119.25z'/%3E%3Cpath fill='%2300' d='M256 144c-19.72 0-37.55 7.39-50.22 20.82s-19 32-17.57 51.93C191.11 256 221.52 288 256 288s64.83-32 67.79-71.24c1.48-19.74-4.8-38.14-17.68-51.82C293.39 151.44 275.59 144 256 144z'/%3E%3C/svg%3E");
  }
  
  .menu-wrap {
    position: relative;
    background-color: transparent;
    max-width: 100%;
    transform: translateX(0);
    transition: none;
    top: auto;
    bottom: auto;
    left: auto;
    box-shadow: none;
    width: 100%;
  }
  
  .menu-wrap .menu {
    flex-direction: row;
    padding: 0;
    gap: 0;
  }
  .menu-wrap .menu,
  .menu-wrap .menu a {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .menu-wrap .menu-item a,
  .menu-wrap .menu-item > span {
    border-bottom: none;
    padding: 6px 14px;
    transition: color 0.15s, background-color 0.15s;
    margin: 4px 0;
  }
  .menu-wrap .menu-item a:hover,
  .menu-wrap .menu-item > span:hover {
    background-color: rgba(255,255,255,0.1);
  }
  .menu-wrap .menu > li,
  .menu-wrap .collapsed,
  .menu-wrap .expanded {
    position: relative;
  }

  /* Desktop dropdown submenus */
  .menu-wrap .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    flex-direction: column;
    background-color: var(--nav-bg);
    border-top: 2px solid var(--primary);
    box-shadow: var(--shadow-md);
    z-index: 30;
    display: none;
    padding: 0;
  }
  .menu-wrap .menu > li:hover > .submenu,
  .menu-wrap .menu > li > .submenu.open {
    display: flex;
  }
  .menu-wrap .submenu li a {
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
  }
  .menu-wrap .submenu li a:hover {
    background-color: var(--primary);
    color: #fff;
  }

  /* Mobile menu icon: hidden on desktop */
  .mobile-menu {
    display: none;
  }
  .close-mobile-menu {
    display: none;
  }
  .primary-menu-wrapper {
    position: static;
  }

  #block-emekiado-kosar .cart-block--summary__icon,
  #block-emekiado-kosar .cart-block--summary__count {
    filter: brightness(0);
    zoom:1.2;
  }

  /* Table cells */
  th { padding: 10px; }
  td { padding: 5px 10px; }

  /* Books grid 4-up on desktop */
  .books-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Footer columns */
  .footer-blocks-container {
    flex-wrap: nowrap;
  }
  .footer-block {
    flex: 1 1 0;
  }
}

/* =========================================
   1200px — Large screens
   ========================================= */
@media (min-width: 1200px) {
  html {
    font-size: 18px;
  }
  .books-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
