/*
Theme Name: AGS Autos Premium
Theme URI: https://agsautos.ie/
Author: AGS Autos
Description: Premium native WooCommerce storefront for AGS Autos.
Version: 2.4.7
Requires at least: 6.4
Tested up to: 6.4
Requires PHP: 7.4
Text Domain: ags-autos-premium
*/

/* AGS Autos Premium — Primary Menu mega-menu and featured product cards */
.ags-primary-menu--dynamic{position:relative}.menu-item--mega-shop{position:static}.ags-mega-trigger{display:inline-flex;align-items:center;gap:.55rem;border:0;background:transparent;color:inherit;font:inherit;font-weight:800;cursor:pointer;padding:1rem .8rem}.ags-mega-trigger svg{width:1rem;transition:transform .2s}.menu-item--mega-shop.is-open .ags-mega-trigger svg{transform:rotate(180deg)}.ags-primary-mega-panel{position:absolute;z-index:50;left:0;right:0;top:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,1.15fr);background:#fff;border:1px solid rgba(20,20,20,.12);border-top:3px solid #d21f2b;box-shadow:0 20px 45px rgba(0,0,0,.18);padding:1.4rem;gap:1.5rem;text-align:left}.ags-primary-mega-panel[hidden]{display:none}.ags-primary-mega__categories{min-width:0}.ags-primary-mega__products{min-width:0;border-left:1px solid #e8e8e8;padding-left:1.5rem}.ags-primary-mega__eyebrow{margin:0 0 .85rem;text-transform:uppercase;letter-spacing:.12em;font-size:.7rem;font-weight:800;color:#d21f2b}.ags-primary-mega__category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem .7rem}.ags-mega-category{display:flex;justify-content:space-between;align-items:center;gap:.5rem;text-align:left;border:1px solid transparent;background:#f7f7f7;color:#222;padding:.7rem .8rem;cursor:pointer;font:inherit;font-size:.88rem;font-weight:700;line-height:1.2}.ags-mega-category:hover{background:#181818;color:#fff;border-color:#181818}.ags-mega-category svg{width:.8rem;flex:0 0 auto}.ags-primary-mega__all-link{display:inline-flex;margin-top:1rem}.ags-mega-products-panel[hidden]{display:none}.ags-mega-products-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.ags-mega-product-card{display:flex;flex-direction:column;gap:.35rem;color:#222;text-decoration:none;font-size:.78rem;line-height:1.25}.ags-mega-product-card__image{display:block;aspect-ratio:1/1;background:#f6f6f6;overflow:hidden}.ags-mega-product-card__image img{width:100%;height:100%;object-fit:cover}.ags-mega-product-card__name{font-weight:800}.ags-mega-product-card__price{color:#d21f2b;font-weight:800}.ags-mega-products-empty{color:#666}.ags-mega-products-panel>.ags-text-link{display:inline-flex;margin-top:1rem}@media (max-width:900px){.ags-primary-mega-panel{position:relative;top:auto;left:auto;right:auto;grid-template-columns:1fr;padding:1rem;gap:1rem;box-shadow:none}.ags-primary-mega__products{border-left:0;border-top:1px solid #e8e8e8;padding:1rem 0 0}.ags-mega-products-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (max-width:600px){.ags-primary-mega-panel{margin:0 -1rem;border-left:0;border-right:0}.ags-primary-mega__category-grid{grid-template-columns:1fr}.ags-mega-products-grid{grid-template-columns:1fr}.ags-mega-product-card{display:grid;grid-template-columns:72px 1fr;grid-template-rows:auto auto;column-gap:.65rem}.ags-mega-product-card__image{grid-row:1/3}.ags-mega-product-card__price{grid-column:2}.ags-mega-trigger{width:100%;justify-content:space-between;padding:.9rem 0}}

        /* Featured product cards: clean retail styling */
        .ags-primary-mega__products{background:#f7f7f7;border:1px solid #e8e8e8;border-radius:16px;padding:1rem;}
        .ags-primary-mega__products .ags-primary-mega__eyebrow{display:flex;align-items:center;gap:.55rem;margin:.1rem 0 1rem;color:#1b1b1b;font-size:.72rem;letter-spacing:.1em;}
                .ags-mega-products-grid{gap:1rem;}
        .ags-mega-product-card{min-width:0;overflow:hidden;background:#fff;border:1px solid #e5e5e5;border-radius:14px;box-shadow:0 5px 16px rgba(0,0,0,.06);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;}
        .ags-mega-product-card:hover,.ags-mega-product-card:focus-visible{color:#222;border-color:#d21f2b;box-shadow:0 12px 26px rgba(0,0,0,.13);transform:translateY(-3px);}
        .ags-mega-product-card__image{margin:0;aspect-ratio:1/1;background:#f1f1f1;}
        .ags-mega-product-card__image img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease;}
        .ags-mega-product-card:hover .ags-mega-product-card__image img,.ags-mega-product-card:focus-visible .ags-mega-product-card__image img{transform:scale(1.04);}
        .ags-mega-product-card__name{display:block;padding:.7rem .75rem .15rem;min-height:2.65rem;font-size:.78rem;font-weight:800;line-height:1.25;}
        .ags-mega-product-card__price{display:block;padding:0 .75rem .75rem;color:#d21f2b;font-size:.82rem;font-weight:800;}
        .ags-mega-products-empty{margin:.25rem 0;padding:1rem;background:#fff;border:1px dashed #ccc;border-radius:10px;}
        @media (max-width:900px){.ags-primary-mega__products{padding:1rem;}.ags-mega-product-card__name{font-size:.76rem;}}
        @media (max-width:600px){.ags-primary-mega__products{border-top:1px solid #e8e8e8;border-radius:0;background:#f7f7f7;}.ags-mega-product-card{border-radius:12px;}.ags-mega-product-card__image{aspect-ratio:1/1;}}

/* AGS navigation: square corners throughout */
.ags-nav-row,
.ags-nav-inner,
.ags-header-navigation,
.ags-primary-menu,
.ags-primary-menu > li,
.ags-mega-trigger,
.ags-primary-mega-panel,
.ags-primary-mega__products,
.ags-mega-category,
.ags-mega-products-panel,
.ags-mega-products-grid,
.ags-mega-product-card,
.ags-mega-product-card__image,
.ags-primary-mega__products .ags-mega-products-empty {
    border-radius: 0 !important;
}

/* Mega-menu category links and compact product actions */
.ags-mega-category{padding:0;}
.ags-mega-category__link{display:flex;align-items:center;flex:1;min-width:0;padding:.7rem .8rem;color:inherit;text-decoration:none;font:inherit;font-size:.88rem;font-weight:700;line-height:1.2;}
.ags-mega-category__preview{display:inline-flex;align-items:center;justify-content:center;align-self:stretch;width:2.35rem;padding:0;border:0;border-left:1px solid rgba(0,0,0,.08);background:transparent;color:inherit;cursor:pointer;}
.ags-mega-product-card__product-link{display:flex;flex-direction:column;gap:0;color:inherit;text-decoration:none;}
.ags-mega-product-card__shop-now{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;margin:0 .75rem .75rem;padding:.38rem .65rem;background:#d21f2b;color:#fff;text-decoration:none;font-size:.7rem;font-weight:800;line-height:1.1;text-transform:uppercase;letter-spacing:.04em;}
.ags-mega-product-card__shop-now:hover,.ags-mega-product-card__shop-now:focus-visible{background:#181818;color:#fff;}
.ags-mega-products-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
@media (max-width:600px){.ags-mega-products-grid{grid-template-columns:1fr;}.ags-mega-category__link{font-size:.82rem;}}

/* Mega-menu headings */
.ags-primary-mega__eyebrow,
.ags-primary-mega__products .ags-primary-mega__eyebrow {
    font-size: 1.2rem !important;
}

/* Larger category navigation icons */
.ags-mega-category svg {
    width: 2.8rem !important;
}

/* Featured products: open layout, matching heading, split action row */
.ags-primary-mega__products{
    background:transparent !important;
    border:0 !important;
    padding:0 !important;
}
.ags-primary-mega__products .ags-primary-mega__eyebrow{
    color:#d21f2b !important;
}
.ags-mega-product-card__footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:.5rem;
    padding:0 .75rem .75rem;
}
.ags-mega-product-card__footer .ags-mega-product-card__shop-now{
    margin:0;
    flex:0 0 auto;
}
.ags-mega-product-card__footer .ags-mega-product-card__price{
    margin-left:auto;
    padding:0;
    text-align:right;
}

/* Featured product proportions and equal-height mega-menu columns */
.ags-primary-mega-panel{
    align-items:stretch;
}
.ags-primary-mega__categories,
.ags-primary-mega__products{
    height:100%;
}
.ags-primary-mega__products{
    display:flex;
    flex-direction:column;
}
.ags-primary-mega__products .ags-mega-products-grid{
    flex:1 1 auto;
    align-content:start;
}
.ags-mega-product-card__image{
    aspect-ratio:1.35 / 1;
}
.ags-mega-product-card__shop-now{
    padding:.58rem .95rem;
    font-size:.78rem;
    min-height:2.2rem;
}
@media (max-width:600px){
    .ags-mega-product-card__image{aspect-ratio:1.35 / 1;}
    .ags-mega-product-card__shop-now{padding:.55rem .8rem;}
}

/* Featured product card spacing */
.ags-mega-product-card {
    padding: 20px;
}

/* Shop All Upgrades trigger */
.ags-mega-trigger {
    font-weight: 400 !important;
    text-transform: capitalize;
}

.ags-mega-trigger {
    text-transform: uppercase;
    font-weight: 400 !important;
}

.ags-mega-trigger {
    text-transform: uppercase;
    font-weight: 600 !important;
}

/* Consistent Tier 1 navigation typography */
.ags-primary-menu--dynamic > .menu-item--mega-shop > .ags-mega-trigger,
.ags-primary-menu--dynamic > .menu-item--tier-one > a {
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600 !important;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}


/* Cart drawer: top-right placement */
.ags-cart-dialog {
    margin: 16px 16px auto auto !important;
    max-height: calc(100vh - 32px);
}

/* Remove the red focus ring from the cart icon after add-to-cart. */
.ags-bag-button:focus-visible,
.ags-bag-button:focus {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

/* Vehicle Compatibility popup: square corners throughout */
.ags-vc-mobile-modal-panel,
.ags-vc-mobile-modal-panel *,
.ags-vc-finder,
.ags-vc-finder * {
    border-radius: 0 !important;
}

/* Editable utility-bar controls */
.ags-utility-message,
.ags-utility-links {
    display: inline-flex;
    align-items: center;
}
.ags-utility-message { gap: .45rem; }
.ags-utility-flag {
    display: inline-flex;
    width: 18px;
    height: 12px;
    flex: 0 0 auto;
}
.ags-utility-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}
.ags-utility-currency {
    display: inline-flex;
    align-items: center;
    padding-left: 20px;
    border-left: 1px solid #ffffff60;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .ags-utility-message { gap: .35rem; }
    .ags-utility-flag { width: 16px; height: 11px; }
}


.ags-utility-currency .ags-utility-flag {
    margin-left: .35rem;
}

@media (max-width: 760px) {
    .ags-header-main.ags-shell {
        gap: 0;
    }
}

.ags-utility-links a + a {
    padding-left: 5px;
}

.ags-utility-links {
    gap: 5px;
}
.ags-utility-links a + a {
    padding-left: 0;
    border-left: 0;
}
.ags-utility-currency {
    padding-left: 0;
    border-left: 0;
}

/* Utility social visibility controls */
@media (max-width: 767px) {
    .ags-utility-links.ags-hide-social-mobile > a {
        display: none;
    }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .ags-utility-links.ags-hide-social-tablet > a {
        display: none;
    }
}

.ags-utility-currency {
    margin-left: .5rem;
}

/* Category carousel arrows */
.category-carousel-section .wrap {
    position: relative;
}
.category-carousel-controls {
    position: absolute;
    inset: 50% 0 auto;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    transform: translateY(-50%);
}
.category-carousel-arrow {
    pointer-events: auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #d8d8d4;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-family: Arial, sans-serif;
    font-size: 31px;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 5px 16px rgba(20,21,24,.12);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, opacity .2s ease;
}
.category-carousel-arrow:hover:not(:disabled),
.category-carousel-arrow:focus-visible {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}
.category-carousel-arrow:hover:not(:disabled) { transform: scale(1.06); }
.category-carousel-arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
}
.category-carousel-dots {
    position: relative;
    z-index: 1;
}
@media (max-width: 600px) {
    .category-carousel-controls {
        inset-inline: 4px;
    }
    .category-carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 27px;
    }
}

/* Category carousel: arrows sit outside the cards with balanced image-side spacing */
.category-carousel-section .category-carousel-viewport {
    margin-inline: 54px;
}
.category-carousel-section .category-carousel-controls {
    inset-inline: 0;
    top: 104px;
    transform: translateY(-50%);
}
.category-carousel-section .category-carousel-dots {
    margin-top: 23px;
}
@media (max-width: 900px) {
    .category-carousel-section .category-carousel-viewport {
        margin-inline: 48px;
    }
    .category-carousel-section .category-carousel-controls {
        top: 92px;
    }
}
@media (max-width: 600px) {
    .category-carousel-section .category-carousel-viewport {
        margin-inline: 42px;
    }
    .category-carousel-section .category-carousel-controls {
        inset-inline: 0;
        top: 82px;
    }
}
