/*
Theme Name: Storefront Child - Ly Design House
Theme URI: https://lydesignhouse.com
Description: Custom child theme for Ly Design House
Author: Ly Design House
Author URI: https://lydesignhouse.com
Template: storefront
Version: 1.0.0
Text Domain: storefront-child
*/

/* #region 0.0 FONTS ============================================================= */

/* nunito-sans-regular - latin */
@font-face {
  font-display: swap;
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  src: url("/wp-content/themes/storefront-child/fonts/nunito-sans-v19-latin-regular.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* nunito-sans-italic - latin */
@font-face {
  font-display: swap;
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 400;
  src: url("/wp-content/themes/storefront-child/fonts/nunito-sans-v19-latin-italic.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* nunito-sans-500 - latin */
@font-face {
  font-display: swap;
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 500;
  src: url("/wp-content/themes/storefront-child/fonts/nunito-sans-v19-latin-500.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* nunito-sans-500italic - latin */
@font-face {
  font-display: swap;
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 500;
  src: url("/wp-content/themes/storefront-child/fonts/nunito-sans-v19-latin-500italic.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* nunito-sans-600 - latin */
@font-face {
  font-display: swap;
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 600;
  src: url("/wp-content/themes/storefront-child/fonts/nunito-sans-v19-latin-600.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* nunito-sans-600italic - latin */
@font-face {
  font-display: swap;
  font-family: "Nunito Sans";
  font-style: italic;
  font-weight: 600;
  src: url("/wp-content/themes/storefront-child/fonts/nunito-sans-v19-latin-600italic.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* nunito-sans-700 - latin */
@font-face {
  font-display: swap;
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  src: url("/wp-content/themes/storefront-child/fonts/nunito-sans-v19-latin-700.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* cormorant-garamond-500 - latin */
@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  src: url("/wp-content/themes/storefront-child/fonts/cormorant-garamond-v21-latin-500.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* cormorant-garamond-500italic - latin */
@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  src: url("/wp-content/themes/storefront-child/fonts/cormorant-garamond-v21-latin-500italic.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* cormorant-garamond-600 - latin */
@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  src: url("/wp-content/themes/storefront-child/fonts/cormorant-garamond-v21-latin-600.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* cormorant-garamond-600italic - latin */
@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 600;
  src: url("/wp-content/themes/storefront-child/fonts/cormorant-garamond-v21-latin-600italic.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* cormorant-garamond-700 - latin */
@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  src: url("/wp-content/themes/storefront-child/fonts/cormorant-garamond-v21-latin-700.woff2")
    format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* #endregion 0.0 FONTS */

/* #region 1.0 BASE / GLOBAL =============================================== */
/* 1.1 Font Family & Weights
-------------------------------------------------------------------------------- */
.site-header,
.site-footer,
button,
input,
textarea {
  font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  text-align: center;
}

.single-product h1.product_title {
  text-align: left;
}

body {
  font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* 1.2 Font Colors 
------------------------------------------------------------------------------ */

/* 1.4 Buttons
------------------------------------------------------------------------------ */

/* 1.5 Links
------------------------------------------------------------------------------ */

/* 1.6 Accessibility / FOCUS STYLES
------------------------------------------------------------------------------ */
*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid #3d348b;
  border-radius: 4px;
}

/*makes sure logo is clickable even if div is not same size*/
.site-header .site-branding .custom-logo-link {
  display: inline-block;
  overflow: visible;
  position: relative;
}

.site-header .site-branding .custom-logo-link .custom-logo {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

/*handles buttons and links globally - no focus on mouse click*/
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none !important;
}

/*handles logo focus - no focus on mouse click*/
.site-header .site-branding .custom-logo-link:focus:not(:focus-visible),
.site-header .site-branding .custom-logo-link:focus:not(:focus-visible) * {
  outline: none;
  box-shadow: none;
}

/*globally removes blue background color on mobile tap and focus*/
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
}

/* 1.7 Utilities (Helper Classes) Usage: .text-center, .margin-top-md, .sr-only, etc.
------------------------------------------------------------------------------ */

/* #endregion 1.0 BASE / GLOBAL */

/* #region 2.0 LAYOUT / STRUCTURE =============================================== */

/*Full width layout for specific page types overrides .col-full reduced width*/
.woocommerce-shop .site-main,
.tax-product_cat .site-main,
.tax-product_tag .site-main,
.search-results .site-main,
.home .site-main {
  max-width: 100%;
}

/* 2.1 Global Column / Sidebar Structure
------------------------------------------------------------------------------ */

/* 2.2 Grid Wrappers & Containers
------------------------------------------------------------------------------ */

/* #endregion 2.0 LAYOUT / STRUCTURE */

/* #region 3.0 HEADER =========================================================== */

/*==============================================
   DESKTOP (768+)
   ============================================== */
@media (min-width: 768px) {
  /* --- Header Layout --- */
  #masthead.site-header {
    padding-top: 1.617924em;
  }

  /* Top row - branding, secondary nav, search */
  .site-header > .col-full {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Bottom row - primary nav and cart */
  .storefront-primary-navigation > .col-full {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .site-branding,
  .site-search,
  .site-header-cart,
  .site-logo-anchor,
  .site-logo-link,
  .custom-logo-link {
    margin-bottom: 0;
  }

  /* 3.1 Branding Logo
------------------------------------------------------------------------------ */
  .site-header .site-branding img {
    max-width: 420px;
    min-width: 420px;
    width: 420px;
    height: auto;
    aspect-ratio: 1667 / 263; /* matches actual image dimensions */
  }

  .site-header .site-branding {
    min-height: 66px;
    width: 420px;
  }

  .site-header .site-branding .custom-logo-link .custom-logo:hover {
    opacity: 0.8;
  }

  /* 3.2 Primary Navigation
  ---------------------------------------------------------------------------- */

  .primary-navigation {
    font-size: clamp(15.5px, 1.05vw, 16.5px);
    font-weight: 500;
    letter-spacing: 0.06em;
  }

  .storefront-primary-navigation .col-full {
    display: flex;
    align-items: center;
    padding-top: 0.5em;
  }

  /* Primary nav color override (prevents default theme hover color change) */
  .primary-navigation ul li a,
  .site-title a,
  .site-branding h1 a,
  button.menu-toggle,
  button.menu-toggle:hover,
  .handheld-navigation .dropdown-toggle {
    color: #2e302f !important;
  }

  .primary-navigation ul.menu li a:hover {
    color: #2e302f !important;
  }

  /* --- Primary Navigation: Links --- */

  .primary-navigation a {
    letter-spacing: 0.055em;
    text-decoration: none;
    transition: text-decoration-color 0.15s ease;
  }

  /*dropdown indicator*/
  .main-navigation ul.menu > li.menu-item-has-children > a::after,
  .main-navigation ul.menu > li.page_item_has_children > a::after,
  .main-navigation ul.nav-menu > li.menu-item-has-children > a::after,
  .main-navigation ul.nav-menu > li.page_item_has_children > a::after {
    margin-left: 0.5em;
    color: rgba(0, 0, 0, 0.6);
  }

  .primary-navigation a:hover,
  .primary-navigation li:hover > a,
  .primary-navigation a:active {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

  .primary-navigation .current-menu-item > a,
  .primary-navigation .current_page_item > a,
  .primary-navigation .current-menu-item > a:visited,
  .primary-navigation .current_page_item > a:visited {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

  /*Remove underline from parent link on submenu hover */
  .primary-navigation ul.menu li:has(> ul.sub-menu:hover) > a {
    text-decoration: none;
  }

  /*primary nav search input box styling*/
  input[type="search"] {
    border-radius: 4px;
    background-color: rgba(187, 201, 195, 0.4);
    border: 1px solid #d1e0da;
  }

  /* --- Primary Navigation: Dropdowns --- */

  .primary-navigation ul ul,
  .primary-navigation ul ul li ul {
    padding: 0;
    border-radius: 4px;
    overflow: visible;
    border: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.025);
  }

  .primary-navigation ul.menu ul {
    width: auto;
    min-width: 250px;
  }

  .main-navigation ul.menu ul.sub-menu,
  .main-navigation ul.nav-menu ul.children {
    background-color: #c2d1cb !important;
  }

  .primary-navigation ul.menu ul li a,
  .primary-navigation ul.nav-menu ul li a {
    color: #2e302f;
    display: block;
    width: 100%;
    white-space: nowrap;
    font-size: clamp(15.5px, 1.05vw, 16.5px);
    font-weight: 500;
    letter-spacing: 0.06em;
    transition: all 0.2s ease;
  }

  /* Remove background color on hover for dropdown links */
  .main-navigation ul.menu ul a:hover,
  .main-navigation ul.menu ul li:hover > a,
  .main-navigation ul.menu ul li.focus,
  .main-navigation ul.nav-menu ul a:hover,
  .main-navigation ul.nav-menu ul li:hover > a,
  .main-navigation ul.nav-menu ul li.focus {
    background-color: rgba(0, 0, 0, 0);
  }

  /*Main menu parent padding*/
  .main-navigation ul.menu > li > a,
  .main-navigation ul.nav-menu > li > a {
    padding: 0.5em 1em 0.5em 1em;
  }

  /*sub-menu drop down link padding*/
  .primary-navigation ul.menu ul li a {
    padding-top: 0.75em;
    padding-bottom: 0.75em;
  }

  /*aria box matches container box - first and last in list*/
  .primary-navigation ul ul li:first-child a {
    border-radius: 4px 4px 4px 4px;
  }

  .primary-navigation ul ul li:last-child a {
    border-radius: 4px 4px 4px 4px;
  }

  /*aria box clipped bottom line top level main menu fix */
  .primary-navigation ul.menu > li > a:focus {
    outline: 2px solid #3d348b;
    border-radius: 4px;
    outline-offset: -2px;
  }

  /* 3.3 Secondary Navigation
  ---------------------------------------------------------------------------- */

  .secondary-navigation .menu {
    font-size: 1em;
    font-size: clamp(14.5px, 1.05vw, 15.5px);
  }

  .secondary-navigation ul.menu a {
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: text-decoration-color 0.15s ease;
  }

  .col-full .secondary-navigation ul.menu a:hover,
  .secondary-navigation ul.menu li:hover > a,
  .secondary-navigation ul.menu a:active {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  .col-full .secondary-navigation ul.menu a:hover {
    color: #575958;
  }

  .secondary-navigation ul.menu .current-menu-item > a,
  .secondary-navigation ul.menu .current_page_item > a,
  .secondary-navigation ul.menu .current-menu-item > a:visited,
  .secondary-navigation ul.menu .current_page_item > a:visited {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  /* 3.4 Search
  ---------------------------------------------------------------------------- */

  /* 3.5 Cart Widget
  ---------------------------------------------------------------------------- */
  .site-header-cart .cart-contents {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 0 0.5em 0;
    color: #434846 !important;
  }

  .col-full .site-header-cart .widget_shopping_cart {
    background-color: #c2d1cb;
  }

  .site-header-cart .cart-contents::after {
    margin-left: auto;
    line-height: 1;
    display: flex;
    align-items: center;
  }
  .site-header-cart .cart-contents .count {
    opacity: 0.75;
  }

  .site-header-cart .widget_shopping_cart {
    background-color: #c2d1cb;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
    border: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.025);
    margin: 0;
  }
  .site-header-cart .cart-contents .amount {
    font-size: clamp(14.5px, 1.05vw, 15.5px);
  }

  /* Explicitly override WooCommerce's targeted declarations */
  .site-header-cart .widget_shopping_cart .buttons,
  .site-header-cart .widget_shopping_cart .total {
    background-color: #c2d1cb;
  }

  /* 3.6 Responsive Adjustments for Header
  ---------------------------------------------------------------------------- */

  /*==============================================
   LARGE DESKTOP — Scale header at 1400px and below
   ============================================== */
  @media (min-width: 768px) and (max-width: 1400px) {
    /* --- Shrink logo proportionally --- */
    .site-header .site-branding img {
      max-width: clamp(350px, 46vw, 420px);
      min-width: unset;
      width: clamp(350px, 46vw, 420px);
      height: auto;
      aspect-ratio: 1667 / 263;
    }

    /*add some space between cost and menu*/
    .woocommerce-active .site-header .main-navigation {
      padding-right: 1em;
    }

    /* --- Shrink nav font and padding --- */
    .primary-navigation ul.menu > li > a,
    .primary-navigation ul.nav-menu > li > a {
      padding: 0.5em;
    }
  }
}

/*==============================================
   MOBILE & TABLET HEADER (< 768px)
   ============================================== */

@media (max-width: 767px) {
  .site-header {
    padding-top: 1em;
    padding-bottom: 1em;
  }

  /*"Menu" font weight in mobile menu button*/
  .site-header button {
    font-weight: 400;
  }

  .primary-navigation ul li a,
  .primary-navigation ul ul li a {
    padding-left: 1.41575em;
    background-color: #c2d1cb;
  }

  .site-header .site-logo-anchor img,
  .site-header .site-logo-link img,
  .site-header .custom-logo-link img {
    max-width: 275px;
    width: 275px;
  }

  .storefront-primary-navigation .col-full {
    margin-right: 1em;
    margin-left: 1em;
  }

  .main-navigation ul li a:hover,
  .main-navigation ul li:hover > a,
  .site-title a:hover,
  .site-header ul.menu li.current-menu-item > a {
    color: #2e302f;
  }

  /* Mobile menu hover and tap states */
  /*.main-navigation ul li a:hover,
  .main-navigation ul li:hover > a,*/
  .main-navigation ul li a:active {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

  /* Mobile menu current/active page states */
  .main-navigation ul li.current-menu-item > a,
  .main-navigation ul li.current_page_item > a,
  .main-navigation ul li.current-menu-item > a:visited,
  .main-navigation ul li.current_page_item > a:visited {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

  /* When hovering a child, remove underline from parent */
  .main-navigation ul li:hover > ul li ~ a,
  .main-navigation ul li:has(ul:hover) > a {
    text-decoration: none !important;
  }

  /* Speed up submenu open/close */
  .handheld-navigation ul.menu .sub-menu {
    transition: all ease 0.2s !important;
  }

  /* Make tabbed aria focus box ignore menu list if not entered into it */
  .handheld-navigation {
    display: none;
  }
  .main-navigation.toggled .handheld-navigation {
    display: block;
  }

  /*box around hamburger menu - get rid of main-nav if doesn't work*/
  .main-navigation button.menu-toggle {
    border: 1px solid #2e303f;
    border-radius: 4px;
    max-width: 90px;
  }

  /* Add space around mobile nav containers for focus outlines */
  .handheld-navigation,
  .nav-menu,
  .main-navigation div.menu > ul:not(.nav-menu) {
    padding: 3px;
  }

  .storefront-handheld-footer-bar {
    padding: 0 3px 3px;
    bottom: -2px;
  }
}
/* #endregion 3.0 HEADER */

/* #region 4.0 Footer ============================================================== */

/* 4.1 Footer Layout & Structure
  ---------------------------------------------------------------------------- */

/* 4.2 Footer Links
--------------------------------------------------------- */
.site-footer a {
  text-decoration: none;
  transition: text-decoration-color 0.15s ease;
}

.site-footer a:hover,
.site-footer a:active {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* 4.3 Responsive Adjustments for Footer
  ---------------------------------------------------------------------------- */
/*==============================================
   MOBILE & TABLET FOOTER (< 768px)
   ============================================== */
/* --- Footer Links --- */
@media (max-width: 767px) {
  .site-footer a {
    text-decoration: none;
    transition: text-decoration-color 0.15s ease;
  }

  .site-footer a:hover,
  .site-footer a:active {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }
}

/* #endregion 4.0 Footer */

/* #region 5.0 Components ============================================================= */

/* 5.1 Buttons
  ---------------------------------------------------------------------------- */

/* 5.2 Breadcrumbs (Rank Math)
  ---------------------------------------------------------------------------- */

.breadcrumb-spacer {
  padding: 0.75em 0; /* same vertical padding as the wrapper */
  height: calc(
    clamp(13.5px, 1.05vw, 14.5px) * 1.618
  ); /* font-size × line-height (body default line height)*/
}

.rank-math-breadcrumb-wrapper {
  padding: 0.75em 2.617924em;
}

/*To override default p margins of 1em*/
.rank-math-breadcrumb-wrapper p {
  margin-block-start: 0;
  margin-block-end: 0;
}

.rank-math-breadcrumb-wrapper span.separator {
  padding: 0 1px;
}

/*Base breadcrumb link styles*/
.rank-math-breadcrumb-wrapper a,
.rank-math-breadcrumb-wrapper span {
  font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(13.5px, 1.05vw, 14.5px);
  color: #575958;
  text-decoration: none;
  transition: text-decoration-color 0.15s ease;
  letter-spacing: 0.03em;
}

/*Hover and active states for breadcrumb links*/
.rank-math-breadcrumb-wrapper a:hover,
.rank-math-breadcrumb-li:hover > a,
.rank-math-breadcrumb-wrapper a:active {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/*Optionally keep: make current page slightly lighter color and remove link*/
.rank-math-breadcrumb-wrapper .last {
  opacity: 0.8;
  pointer-events: none;
}
/* #endregion 5.0 Components */

/* #region 6.0 WooCommerce Customization =============================================== */
/* Note: CSS within this section is overriding WooCommerce default output. Mark individual rules with override reason. */

/* 6.1 Global WooCommerce Elements: badges, star ratings, product titles, prices, etc. system notices (error/success)
  ---------------------------------------------------------------------------- */

/* 6.2 Structural / Layout Fixes 
  ---------------------------------------------------------------------------- */

/* 6.3 Category Archive Pages
  ---------------------------------------------------------------------------- */

/* 6.4 Single Product Pages
  ---------------------------------------------------------------------------- */

/* 6.5 Cart Page
  ---------------------------------------------------------------------------- */

/* 6.6 Checkout Page
  ---------------------------------------------------------------------------- */

/* 6.7 Account Pages
  ---------------------------------------------------------------------------- */

/* 6.8 Widgets: Price filters, layered nav, product categories list, etc.
  ---------------------------------------------------------------------------- */

/*Override WooCommerce's default padding on product search widget 404 page*/
.error404 .site-content .widget_product_search {
  padding: 0;
}
/* #endregion 6.0 WooCommerce Customization */

/* #region 7.0 Additional Custom Pages (About, Contact, etc.) =============================================== */

/*Get rid of Storefront Home page header default margin bottom of 4.235801032em*/
.hfeed site .home.blog .site-header,
.home.page:not(.page-template-template-homepage) .site-header,
.home.post-type-archive-product .site-header {
  margin-bottom: 0;
}

/* #endregion 7.0 Additional Custom Pages (About, Contact, etc.) */
