
/*
 * Load this file after the main theme CSS.
 *
 * Goals:
 * 1. Interactive targets: minimum 44 x 44 CSS pixels.
 * 2. Main body text: minimum 14px.
 * 3. Secondary text: minimum 12px.
 * 4. Preserve existing responsive layout and avoid page-level overflow.
 */

/* ================================================================
   1. HEADER AND NAVIGATION
   ================================================================ */

/*
 * Technique used in the header: "padding + equal negative margin".
 * The padding enlarges the clickable box to >= 44px, the negative margin
 * gives that space back, so the visible layout stays exactly as designed.
 * Do NOT switch these links to display:flex — the dropdown caret
 * (li.level1.dropdown a::before, top:12px) is positioned for display:block.
 */

/* Main navigation (desktop bar and mobile menu share #navbar).
   Links are 40px tall by design; add 4px below the text. */
#navbar > li.level1 > a {
    height: 44px; /* theme sets height:40px (border-box) */
    padding-bottom: 4px;
    margin-bottom: -4px;
    min-width: 44px; /* short labels such as "SALE" */
    box-sizing: border-box;
}

/* Logo link */
.logo > a {
    display: inline-block;
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-top: -12px;
    margin-bottom: -12px;
    box-sizing: border-box;
}

/* Breadcrumb links ("Home" is ~38px wide, so add a little width too) */
.textbreadcrumb li > a {
    min-height: 44px;
    padding: 12px 4px;
    margin: -12px -4px;
    box-sizing: border-box;
}

/* Header top row: social icons, Search, Login/Register, Wish List, Cart.
   Text/icons are ~20px tall; 12px above and below makes 44px. */
.left_div > a,
.icon-cart > a,
.content_left p.acc > a,
.content_right p.wish > a,
#header .search.dropdown {
    display: inline-block;
    min-height: 44px; /* text line is ~19.99px, so padding alone gives 43.99px */
    min-width: 44px;  /* mobile shows icon-only account / wish / cart links */
    padding-top: 12px;
    padding-bottom: 12px;
    margin-top: -12px;
    margin-bottom: -12px;
    box-sizing: border-box;
}

.left_div > a,
.icon-cart > a,
.content_left p.acc > a,
.content_right p.wish > a {
    text-align: center;
}

#header .search.dropdown {
    display: block; /* keep its original display */
    cursor: pointer;
}

/* Mobile header: 8 icons share one ~296px row (8 x 44px = 352px won't fit),
   so 44px-wide targets would overlap each other. Keep the original layout and
   enlarge each target only into the free space around it (~30px). */
@media (max-width: 767px) {
    .left_div > a,
    .icon-cart > a,
    .content_left p.acc > a,
    .content_right p.wish > a,
    #header .search.dropdown {
        min-width: 0;
        min-height: 0;
        padding-top: 6px;
        padding-bottom: 6px;
        margin-top: -6px;
        margin-bottom: -6px;
    }
    /* account / wish: small gaps, 3px each side */
    .content_left p.acc > a,
    .content_right p.wish > a {
        padding-left: 3px;
        padding-right: 3px;
        margin-left: -3px;
        margin-right: -3px;
    }
    /* cart has more free space around it */
    .icon-cart > a {
        padding: 6px 5px;
        margin: -6px -5px;
    }
    /* Social icons: the template sets an inline margin-left:6px on icons 2-4,
       which would override a negative left margin, so pad on the right only. */
    .left_div > a {
        padding: 6px 6px 6px 0;
        margin-top: -6px;
        margin-right: -6px;
        margin-bottom: -6px;
    }
    .left_div > a:first-child {
        margin-left: 0;
    }
    /* theme gives Search margin-top:2px on mobile; keep that offset */
    #header .search.dropdown {
        margin-top: -4px;
    }
}

/* Dropdown submenu items (Catalog, Shipping, Payment...): 40px -> 44px.
   Bottom padding only, so the square bullet (::before) stays level with the text. */
#navbar .menu-level-1 > li.level2 > a {
    height: 44px; /* theme sets height:40px; text keeps its 40px line at the top */
}

/* ================================================================
   2. PRODUCT CARDS AND PRODUCT ACTIONS
   ================================================================ */

/* Wishlist, quick-view and other product action icons */
.product .action > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

/* Keep action icons aligned */
.product .action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Product image link: make the inline <a> wrap the whole image
   so the full image is the target (was a 17px-high inline box). */
.product .product-images > a {
    display: block;
    min-height: 44px; /* still a valid target if the image fails to load */
}

/* Product title link (wraps p.product-title).
   display:block (not flex): flex shrank the title to its text width and
   moved short titles down; block keeps the title exactly where it was. */
.product > a {
    display: block;
    min-height: 44px;
    box-sizing: border-box;
}

/* Sidebar category list.
   display:block + padding (not flex): flex turned the link's ::before bullet
   into a block flex item and caused horizontal overflow on /all-products/* on mobile. */
.product-categories li > a {
    display: block;
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: 20px;
    box-sizing: border-box;
}

/* ================================================================
   3. BUTTONS AND INTERACTIVE CONTROLS
   ================================================================ */

.btn,
button,
input[type="submit"],
input[type="button"],
a.link-v1,
a.slide-btn,
button.link-v1,
button.link-v1.rt {
    min-height: 44px;
    box-sizing: border-box;
}

/* Outline buttons such as "View All": the theme sets line-height 35px
   (32px on mobile), so with min-height 44px the label sat at the top of the
   box. Line-height 42px + 1px borders = 44px, label vertically centred.
   (.link-v1.lh-50 and the product-detail buttons keep their own line-height.) */
a.link-v1 {
    line-height: 42px;
}

/* Icon-only controls */
.slick-arrow,
.slick-dots button,
.modal .close {
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

/* Keep carousel controls visually centred */
.slick-arrow,
.slick-dots button,
.modal .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Avoid unnecessarily large text-button widths */
.btn,
button,
input[type="submit"],
input[type="button"] {
    min-width: 0;
}

/* ================================================================
   4. FORM CONTROLS
   ================================================================ */

input.form-control,
.form-horizontal input[type="text"],
.form-horizontal input[type="email"],
.form-horizontal input[type="password"],
.form-horizontal input[type="number"],
select,
select.form-control,
.order-by select,
select.orderby,
#filter,
#newsletter,
textarea.form-control {
    min-height: 44px;
    box-sizing: border-box;
}

/* Product quantity controls */
.product-qty .minus,
.product-qty .plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
    cursor: pointer;
}

.product-qty input {
    min-height: 44px;
    box-sizing: border-box;
}

/* ================================================================
   5. FOOTER AND UTILITY LINKS
   ================================================================ */

#footer .list-footer li {
    padding: 0;
}

#footer .list-footer li > a,
.list-footer li > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
}

/* Footer email link sits inside running text: stay inline and enlarge the
   hit area with padding only (vertical padding on an inline element does not
   change line spacing), so the address block keeps its original spacing. */
.footer-contact p > a {
    padding: 15px 0; /* 15px text line + 30px = 45px */
}

/* Yellow announcement bar on the home page: same inline-padding technique,
   so the bar keeps its original height (inline-flex + min-height made it
   ~27px taller than the black marquee bar below). */
.head_product_authentic > a {
    padding: 14px 0; /* 17px text line + 28px = 45px */
}

.not-found-help > a,
.remember a.help,
.termsline > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
}

/* Normal text links remain inline.
   Add class="touch-link" only to standalone links needing a larger target. */
.touch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
}

/* ================================================================
   6. MAIN TYPOGRAPHY
   ================================================================ */

/* Main body and content text */
body {
    font-size: 14px;
}

/* Note: no blanket "p { 14px }" rules here. Content paragraphs inherit 14px
   from body; a blanket rule would also SHRINK larger text (About page
   headings 18px, Contact intro 17px). Only text that was below 14px is
   listed, below. */

/* Main text that was 13px */
.product .product-title,
.slide-content p.slide-subtitle,
.hover-item p,
.wrap-price p.text {
    font-size: 14px;
}

/* Secondary text that was below 12px.
   Do not add text that is already 12px or larger: this rule sets an exact
   size, so it would shrink it (footer links and product short descriptions
   were 13-14px and were removed from this list for that reason). */
.products .product .content-star,
.products .product .lable,
#header .cart .cart-count,
.wish-count,
.button-v2,
.button1,
.link-footer i,
.shipping-v2 p,
.shipping-v2 h3,
.related-products .product-details a,
.table.wishlist tbody .add-cart a.btn,
.coupon button,
.tabs li span,
.check-out .form-horizontal label.control-label .short,
.product-details-content .best-with-product-box .content .product .detail .price_add .add-cart,
#header .header-top .menu-top li .menu-level2 li a,
.footer-bottom,
small,
.small,
.text-muted,
.help-block,
.form-text {
    font-size: 12px !important;
    line-height: 1.4;
}

/* Product short description: 13px on desktop (left as is), but the theme
   drops it to 11px on phones. */
@media (max-width: 767px) {
    .products .product .short_description {
        font-size: 12px !important;
    }
}

/* Keep form labels readable */
label,
.form-horizontal label {
    font-size: 14px;
}

/* ================================================================
   6b. CHECKOUT (checkout, check_out, whsl_checkout)
   ================================================================ */

/* "Existing Address" button floats beside the 22px heading. At 44px tall it
   hung below the heading; centre it on the heading line instead, so the
   44px target doesn't push or crowd the form. */
#existing_address {
    min-height: 44px;
    margin-top: -11px;
    margin-bottom: -11px;
    padding: 0 10px;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 3px;
    line-height: 1.2;
    cursor: pointer;
}

/* On phones the heading wraps to two lines, so the button already fits
   beside it; no offset needed (it would overlap the heading text). */
@media (max-width: 767px) {
    #existing_address {
        margin-top: 0;
        margin-bottom: 0;
    }
}

#existing_address:hover,
#existing_address:focus {
    border-color: red;
    background: #fff;
}

/* Form labels: the theme sets "font: 700 12px/5px" (5px line-height). Fine
   while a label fits on one line, but on phones long labels ("CAN SHIP BY
   POSTAL SERVICE...", "PLEASE CHOOSE THE OPTION...") wrap and the lines are
   drawn on top of each other. This was already broken before
   accessibility.css; give wrapped lines real spacing on phones. */
@media (max-width: 767px) {
    .check-out .form-horizontal label.control-label {
        line-height: 1.4;
        margin-bottom: 6px;
    }
}

/* Terms checkbox: the 13px checkbox sat on its own line whenever the label
   wrapped. Checkbox and label now share one row; the whole label (44px tall)
   toggles the checkbox, so the tap target is the full line. */
.terms-check {
    clear: both; /* the ORDER TOTAL row above uses uncleared floats */
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.terms-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 12px 0 0; /* level with the first text line of the label */
    accent-color: red;
    cursor: pointer;
}

.terms-check label {
    flex: 1 1 auto;
    min-height: 44px;
    margin: 0;
    padding: 12px 0;
    line-height: 20px;
    cursor: pointer;
}

/* ================================================================
   7. RESPONSIVE SAFETY
   ================================================================ */

img {
    max-width: 100%;
    height: auto;
}

/* Comparison tables: always render through
   resources/views/home/partials/comparison-table.blade.php, which wraps the
   table in this container. The table scrolls inside the wrapper; the page
   itself never scrolls sideways (tested at 320px). */
.comparison-table-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0; /* if placed in a flex/grid parent, don't grow to the table width */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.comparison-table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    font-size: 14px;
    border: 1px solid #e4e4e4;
    text-align: left;
    vertical-align: top;
}

.comparison-table thead th {
    background: #f7f7f7;
    font-weight: 700;
}

/* Visible focus ring: the wrapper is keyboard-focusable so it can be scrolled */
.comparison-table-wrapper:focus-visible {
    outline: 2px solid red;
    outline-offset: 2px;
}

/* A Bootstrap .row placed directly in .wrappage (no .container) pushed its
   -15px gutters past the viewport and caused horizontal scroll on the home page. */
.wrappage > .row {
    margin-left: 0;
    margin-right: 0;
}

/* ...and drop the column gutter too, so the content (home news slider) keeps
   its original full-width size. */
.wrappage > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

/* Google reCAPTCHA is a fixed 304px iframe; on ~320px screens it overflowed
   the contact form. Scale it slightly on very narrow screens only. */
@media (max-width: 359px) {
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

/* Avoid accidental page-wide overflow */
html,
body {
    max-width: 100%;
}