/* =========================================================================
   MINOAN · skin overrides
   -------------------------------------------------------------------------
   Loaded LAST, after custom_overrides.html (index.html:1393), so it wins
   against the theme block that custom_styles.html generates. That block
   uses !important heavily, which is why so many rules here do too.

   Everything expressible as a scheme token lives in schemes/minoan.conf or
   styles/styles_fonts.conf instead. This file is only for the Minoan
   signatures that no token covers:

     1  tokens              7  module headings
     2  buttons             8  sidebar list accent
     3  the 60px header     9  pagination
     4  search bar         10  teaser bands
     5  product card       11  page-header emboss
     6  badges             12  mega-menu / dropdowns
                           13  breadcrumb
   ========================================================================= */


/* 1 ── tokens ─────────────────────────────────────────────────────────── */
:root {
    --minoan-green:        #42b549;   /* primary actions            */
    --minoan-green-hover:  #30ad38;
    --minoan-green-light:  #7ac142;   /* cart count pill            */
    --minoan-orange:       #ff5722;   /* badges, search, buy-now    */
    --minoan-orange-warm:  #f8941f;   /* long-teaser headings       */
    --minoan-red:          #f44336;   /* module links, prices       */
    --minoan-cyan:         #0192b5;   /* body links                 */
    --minoan-slate:        #3c4349;   /* card action buttons        */
    --minoan-slate-mid:    #596068;   /* pagination                 */
    --minoan-slate-dark:   #353b44;
    --minoan-bar:          #f4f4f4;   /* the header strip           */
    --minoan-bar-edge:     #d9d9d9;
    --minoan-rule:         #e0e0e0;
    --minoan-rule-soft:    #e4e4e4;
    --minoan-radius:       4px;       /* the house radius           */
    --minoan-radius-btn:   3px;
}


/* 2 ── buttons ────────────────────────────────────────────────────────── */
/* custom_styles_important.html only wires .btn-primary to the scheme.
   The other variants are wired here, so design_elements.class_suffix
   (set by 07-design-elements-buttons.sql) actually changes colour.       */

.btn-success, .btn-success:focus {
    background-color: var(--minoan-green) !important;
    border-color:     var(--minoan-green) !important;
    color: #fff !important;
}
.btn-success:hover {
    background-color: var(--minoan-green-hover) !important;
    border-color:     var(--minoan-green-hover) !important;
}

.btn-warning, .btn-warning:focus {
    background-color: var(--minoan-orange) !important;
    border-color:     var(--minoan-orange) !important;
    color: #fff !important;
}
.btn-warning:hover {
    background-color: var(--minoan-orange-warm) !important;
    border-color:     var(--minoan-orange-warm) !important;
}

/* the slate card-action buttons -- design_elements maps the icon-only row
   on the product card to btn-dark                                        */
.btn-dark, .btn-dark:focus {
    background-color: var(--minoan-slate) !important;
    border-color:     var(--minoan-slate) !important;
    color: #fff !important;
}
.btn-dark:hover {
    background-color: #4a525a !important;
    border-color:     #4a525a !important;
}

/* Minoan buttons are flat: no bootstrap shadow, tight 3px corners
   (LayoutButtonsCornerRadius already emits the radius; this kills depth) */
.btn, .btn-primary, .btn-success, .btn-warning, .btn-dark, .btn-danger, .btn-info {
    box-shadow: none !important;
    text-shadow: none !important;
    border-width: 1px;
}


/* 3 ── the header: one 60px #f4f4f4 strip ─────────────────────────────── */
/* Aegean stacks three white header rows. Minoan is a single grey bar
   carrying logo · categories · top links · search · cart, full-bleed with
   the content constrained by .wrapper.                                    */

header {
    background-color: var(--minoan-bar);
    border-bottom: 1px solid var(--minoan-bar-edge);
    box-shadow: 0 1px 2px 1px rgba(166, 166, 166, 0.1);
}

header .header-row-1 {
    min-height: 60px;
    align-items: center;
}
header .header-row-1 > section {
    display: flex !important;
    align-items: center;
}

/* row 1 is the nav strip -- same grey, separated by a hairline */
header .header-row-2 {
    border-top: 1px solid #e6e6e6;
    min-height: 42px;
    align-items: center;
}
header .header-row-2 > section { display: flex !important; align-items: center; }
/* row 2 holds `headerbar`, empty in the default module set */
header .header-row-3:empty, header .header-row-3 > section:empty { min-height: 0; }

/* the two navs must stay on one line each */
#position_categories .nav.horizontal,
#position_over_top_bar .nav {
    flex-wrap: nowrap;
    white-space: nowrap;
    margin-bottom: 0;
}
#position_over_top_bar .nav { justify-content: flex-end; }

/* the category bar lives inside the grey strip, not on its own band */
#position_categories {
    background-color: transparent !important;
}

header .box_logo img { max-height: 44px; width: auto; }


/* 4 ── search: orange Go button welded to the input ───────────────────── */
.box_search_bar .classic_search_bar,
.box_search_bar form { position: relative; }

.box_search_bar input.search,
.box_search_bar input.searchbar-input,
.box_search_bar .form-control {
    border: 1px solid var(--minoan-rule-soft) !important;
    border-radius: var(--minoan-radius-btn) 0 0 var(--minoan-radius-btn) !important;
    height: 34px;
    background: #fff;
    box-shadow: none !important;
}

.box_search_bar button,
.box_search_bar .search-btn,
.knowledgebase_search_form button {
    background-color: var(--minoan-orange) !important;
    border: 1px solid var(--minoan-orange) !important;
    border-radius: 0 var(--minoan-radius-btn) var(--minoan-radius-btn) 0 !important;
    color: #fff !important;
    height: 34px;
    min-width: 44px;
    margin-left: -1px;
}
.box_search_bar button:hover,
.box_search_bar .search-btn:hover {
    background-color: var(--minoan-orange-warm) !important;
    border-color:     var(--minoan-orange-warm) !important;
}


/* 5 ── the product card (catalog_thumb3) ──────────────────────────────── */
/* Aegean hides the action row behind an image-hover overlay and puts the
   vendor under the title. Minoan shows the actions always, in a dashed row
   under the price, and closes the card with a vendor + location row.
   catalog_thumb3.html is restructured to match; these rules dress it.
   The 4px radius comes from LayoutCatalogBoxCornerRadius, the border colour
   from ColorCatalogItemBorder.                                             */

.product-card.card {
    border: 1px solid var(--minoan-rule) !important;
    margin-bottom: 30px !important;
    min-height: 0 !important;
    background: #fff;
    transition: border-color .3s ease-in-out;
}
.product-card.card:hover { border-color: #cfcfcf !important; }

/* actions are permanent now, so the hover overlay would double them up */
.product-card .product-action-buttons-hover { display: none !important; }

.card.product-card .card-title,
.catalog-thumb3 .card-title {
    text-transform: uppercase !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 19px;
    max-height: 39px;          /* exactly two lines, then clip */
    overflow: hidden;
    margin-bottom: .35rem;
}

/* the orange price is Minoan's loudest single detail */
.catalog-thumb3 .catalog-price,
.product-card .catalog-price {
    color: var(--minoan-orange) !important;
    font-weight: 600;
}
.product-card .strike-price {
    color: #9a9a9a;
    text-decoration: line-through;
    font-size: 12px;
    margin-left: 6px;
}

/* the two dashed rules -- the card's signature */
.product-card .card-footer {
    border-top: 1px dashed var(--minoan-rule) !important;
    background: transparent !important;
    padding: 8px 12px;
}

/* row 1: icon-only actions, evenly spread, slate on hover */
.product-card .minoan-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
}
/* the installment-plan blurb lives in this row too -- give it its own line */
.product-card .minoan-action-row .card-text {
    flex-basis: 100%;
    font-size: 11px;
    color: #8a8a8a;
    margin: 6px 0 0;
    text-align: center;
}
.product-card .minoan-action-row a,
.product-card .minoan-action-row button,
.product-card .minoan-action-row form { margin: 0; }
.product-card .minoan-action-row a,
.product-card .minoan-action-row button {
    background: transparent;
    border: 0;
    color: #8a8a8a;
    font-size: 15px;
    line-height: 1;
    padding: 4px 8px;
    transition: color .2s ease-in-out;
}
.product-card .minoan-action-row a:hover,
.product-card .minoan-action-row button:hover { color: var(--minoan-slate); }

/* row 2: vendor, with the location pin pushed right */
.product-card .minoan-vendor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}
.product-card .minoan-vendor-row .vendor-name {
    color: #8a8a8a;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card .minoan-vendor-row .vendor-name:hover { color: var(--minoan-red); }
.product-card .minoan-vendor-row .vendor-location {
    color: #9a9a9a;
    white-space: nowrap;
    flex-shrink: 0;
}
.product-card .minoan-vendor-row .vendor-location i { margin-right: 3px; }

/* image hover zoom, as v6 */
.product-card .catalog-thumb-image,
.product-card .card-img-top { overflow: hidden; }
.product-card .catalog-thumb-image img { transition: transform .3s ease-in-out; }
.product-card:hover .catalog-thumb-image img { transform: scale(1.1); }


/* 6 ── badges as left-edge flag tabs ──────────────────────────────────── */
/* v6 metrics, verbatim: main_desktop.css:5601-5629                        */

[class^="ixxo-badge-"]:before,
[class*=" ixxo-badge-"]:before {
    border-radius: 0 var(--minoan-radius) var(--minoan-radius) 0;
    position: absolute;
    top: 0;
    left: 0;
    display: inline-block;
    z-index: 2;
    min-height: 32px;
    padding: 3px 25px;
    line-height: 32px;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    color: #fff;
    background-color: var(--minoan-orange);
}
.catalog-thumb3 [class^="ixxo-badge-"]:before,
.catalog-thumb3 [class*=" ixxo-badge-"]:before { top: 45px; }
.catalog-view  [class^="ixxo-badge-"]:before,
.catalog-view  [class*=" ixxo-badge-"]:before { top: 15px; }

[class^="ixxo-badge-"].small-badge:before,
[class*=" ixxo-badge-"].small-badge:before { left: 7px; padding: 0 10px; top: 10px; }

.ixxo-badge-hotdeal:before { background-color: #ef5350; }


/* 7 ── module headings: flat, uppercase, no colour bar ────────────────── */
.module h2.header,
.module h3.module-header,
.module .module-header {
    text-transform: uppercase;
    letter-spacing: 0;
    background: transparent !important;
    border-bottom: 1px solid var(--minoan-rule-soft);
    padding: 0 0 6px 0;
    margin-bottom: 12px;
}
/* sidebar modules get a light header strip, as v6 */
.sidebar .module h2.header,
.sidebar .module h3.module-header {
    background: #f5f5f5 !important;
    border-bottom: 1px solid var(--minoan-rule-soft);
    padding: 0 10px;
}

/* the home page deliberately inverts the uppercase rule */
.home .module h2.header,
.home .module h3.module-header {
    text-transform: none;
    font-size: 16px !important;
    color: #606060 !important;
}


/* 8 ── sidebar list accent: 2px left bar on hover/active ──────────────── */
.sidebar .module ul li > a,
.module .module-body ul li > a {
    display: block;
    padding: 5px 0 5px 10px;
    border-left: 2px solid transparent;
    transition: all .2s ease-in-out;
}
.sidebar .module ul li > a:hover,
.sidebar .module ul li.active > a {
    border-left-color: var(--minoan-red);
    padding-left: 14px;
    color: var(--minoan-red) !important;
}


/* 9 ── pagination as one connected slate bar ──────────────────────────── */
.pagination { gap: 0; }
.pagination .page-item .page-link {
    background-color: var(--minoan-slate-mid);
    border: 1px solid var(--minoan-slate-mid);
    color: #fff;
    border-radius: 0;
    margin: 0;
    padding: 6px 14px;
}
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child  .page-link {
    background-color: #686e76;
    border-color:     #686e76;
}
.pagination .page-item:first-child .page-link { border-radius: var(--minoan-radius) 0 0 var(--minoan-radius); }
.pagination .page-item:last-child  .page-link { border-radius: 0 var(--minoan-radius) var(--minoan-radius) 0; }
.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
    background-color: var(--minoan-slate-dark);
    border-color:     var(--minoan-slate-dark);
    color: #fff;
}


/* 10 ── teaser bands ──────────────────────────────────────────────────── */
/* class_suffix contracts driven from shop_modules -- see
   08-trust-badge-band.sql, which tags the bottom_c band `bottom-teaser`. */

.module.bottom-teaser { text-align: center; padding: 24px 12px; }
.module.bottom-teaser h3 {
    color: var(--minoan-green);
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    margin: 12px 0 6px;
}
.module.bottom-teaser p { color: #8a8a8a; font-size: 12px; margin: 0; }
.module.bottom-teaser img { max-height: 56px; width: auto; }

.module.long-teaser h3 {
    color: var(--minoan-orange-warm);
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px dashed var(--minoan-rule);
    padding-bottom: 8px;
    margin-bottom: 14px;
}


/* 11 ── page-header emboss ────────────────────────────────────────────── */
/* An era marker, but it is unmistakably Minoan. */
h1.header, h2.header.page-header {
    text-shadow: 0 2px 1px rgba(255, 255, 255, 0.8);
    margin-bottom: 50px;
}


/* 12 ── mega-menu and dropdowns ───────────────────────────────────────── */
/* ModuleCategoryBarCategoryLevels=3 makes box_category_bar.html:140 emit
   .mega-menu, which ALREADY renders the 300px category image pinned right
   (styles/modules.css:572-586). Only the panel chrome differs from Minoan:
   rounded at the bottom only, hairline border, soft glow.                  */

.box_category_bar .nav.mega-menu li .dropdown-menu,
.box_category_bar .nav.simple-menu li .dropdown-menu {
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--minoan-rule-soft);
    border-top: 0;
    box-shadow: 0 6px 7px -7px #616161 !important;
}
.box_category_bar .nav.mega-menu li .dropdown-menu { padding: 28px 32px; }

/* The panel's containing block is <header> (layout.css:59, position:relative),
   which is full-bleed, so width:100% would make it viewport-wide. Minoan has a
   fixed 1200px shell, so pin it to the same column.
   KEEP IN SYNC with layout_settings.LayoutSiteMaxWidth (02-layout-settings.sql). */
.box_category_bar .nav.mega-menu li .dropdown-menu {
    max-width: 1200px;
    left: 50%;
    transform: translateX(-50%);
}

/* Minoan lays level-2 out in four columns */
.box_category_bar .nav.mega-menu .dropdown-menu .categories {
    column-count: 4;
    column-gap: 28px;
}
.box_category_bar .nav.mega-menu .dropdown-menu .categories > ul {
    break-inside: avoid;
    min-width: 0;
    width: 100%;
}

/* nav items deliberately do NOT change colour on hover -- Minoan sets
   ColorMenuItemTextHover identical to ColorMenuItemText. Only an underline
   moves.                                                                   */
.box_category_bar .nav.horizontal > li > a { position: relative; }
.box_category_bar .nav.horizontal > li > a:after {
    content: "";
    position: absolute;
    left: 12px; right: 12px; bottom: 6px;
    height: 2px;
    background: var(--minoan-green);
    transform: scaleX(0);
    transition: transform .2s ease-in-out;
}
.box_category_bar .nav.horizontal > li:hover > a:after { transform: scaleX(1); }


/* 13 ── breadcrumb: transparent, hairline rule ────────────────────────── */
/* ColorPageBreadcrumbBackground is `transparent` in minoan.conf; this adds
   the rule underneath that v6 had.                                        */
.breadcrumb {
    border-bottom: 1px solid var(--minoan-rule-soft);
    padding: 10px 0;
    margin-bottom: 24px;
}


/* 14 ── mini-cart: the green stack ────────────────────────────────────── */
/* Real classes from box_cart_bar.html: .cart-dropdown / .subtotal /
   .action-btns / .counter, plus #mobile_header_cart_counter in the
   layout skeleton.                                                        */

.box_cart_bar .counter,
#mobile_header_cart_counter {
    background-color: var(--minoan-green-light) !important;
    color: #fff !important;
    border-radius: 50%;
}

.box_cart_bar .cart-dropdown .subtotal,
.box_cart_bar .offcanvas .subtotal {
    background-color: var(--minoan-green) !important;
    color: #fff !important;
    padding: 10px 14px;
    font-weight: 600;
}
.box_cart_bar .cart-dropdown .subtotal .catalog-price,
.box_cart_bar .offcanvas .subtotal .catalog-price { color: #fff !important; }

/* the lighter action strip under the subtotal, with the -8px split join */
.box_cart_bar .cart-dropdown .action-btns,
.box_cart_bar .offcanvas .action-btns {
    background-color: #eaf6ea;
    padding: 10px 14px;
    display: flex;
    gap: 0;
}
.box_cart_bar .action-btns .btn:first-child { border-radius: var(--minoan-radius-btn) 0 0 var(--minoan-radius-btn); }
.box_cart_bar .action-btns .btn:last-child  { border-radius: 0 var(--minoan-radius-btn) var(--minoan-radius-btn) 0; margin-left: -1px; }

.box_cart_bar .cart-dropdown {
    border: 1px solid var(--minoan-rule-soft);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 7px -7px #616161;
}


/* 15 ── product page (Style6) ─────────────────────────────────────────── */
/* CatalogProductPage=Style6 is v6 Minoan's choice, and block_generic_layout
   hides both sidebars for it ($body neq "product_style6.html"), so the page
   runs full width. Colours and type come from the scheme tokens; this is the
   framing.                                                                 */

.product-view.style6 .images {
    border: 1px solid var(--minoan-rule);
    border-radius: var(--minoan-radius);
    padding: 12px;
    background: #fff;
}

/* the right-hand purchase panel reads as a boxed unit */
.product-view.style6 > .row.row-gutters > .col-md-3:last-child {
    border: 1px solid var(--minoan-rule);
    border-radius: var(--minoan-radius);
    padding: 18px;
    background: #fafafa;
    align-self: flex-start;
}

.product-view .share-product {
    border-bottom: 1px dashed var(--minoan-rule);
    padding-bottom: 12px;
}

.product-view .product-extended-description {
    border-top: 1px solid var(--minoan-rule-soft);
    margin-top: 40px;
    padding-top: 24px;
}

/* tabs pick up the slate/green language rather than bootstrap blue */
.product-view .nav-tabs .nav-link.active {
    border-bottom: 2px solid var(--minoan-green);
    color: var(--minoan-slate);
    font-weight: 600;
}
