/**
 * AutoMenu ACF Blocks – Unified Stylesheet
 *
 * System-font stacks only (no external font loading).
 * Matches the Figma "Webpage Design" dark/gold aesthetic.
 *
 * @package Blocksy_Child
 * @subpackage ACF_Blocks
 */

/* ═══════════════════════════════════════════════
   0.  DESIGN TOKENS
   ═══════════════════════════════════════════════ */
:root {
    /* Brand palette */
    --am-gold:        #C8952E;
    --am-gold-light:  #D4A84A;
    --am-gold-dark:   #A67B24;

    /* Dark tones */
    --am-dark:        #1A1A1A;
    --am-darker:      #111111;
    --am-darkest:     #0A0A0A;
    --am-card-bg:     #1E1E1E;

    /* Light tones */
    --am-bg-light:    #F5F5F5;
    --am-bg-white:    #FFFFFF;

    /* Text */
    --am-text-white:  #FFFFFF;
    --am-text-gray:   #B0B0B0;
    --am-text-muted:  #888888;
    --am-border:      #333333;
    --am-border-light:#E0E0E0;

    /* Typography – system stacks */
    --am-font-heading: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --am-font-body:    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --am-gutter:   48px;
    --am-gap:      18px;
    --am-radius:   10px;
}

@media (max-width: 1024px) {
    :root { --am-gutter: 24px; }
}

@media (max-width: 640px) {
    :root { --am-gutter: 16px; --am-gap: 12px; }
}

/* ═══════════════════════════════════════════════
   0-B.  SHARED / UTILITY
   ═══════════════════════════════════════════════ */
.am-section-title {
    font-family: var(--am-font-heading);
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--am-dark);
    margin: 0 0 28px;
    line-height: 1.15;
}

.am-section-title--center { text-align: center; }

.am-section-title--display {
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: 1.5px;
}

.am-section-title--light,
.am-products--dark .am-section-title {
    color: var(--am-text-white);
}


/* ═══════════════════════════════════════════════
   1.  HERO BANNERS
   ═══════════════════════════════════════════════ */
.am-hero-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 28px var(--am-gutter);
    background: var(--am-bg-light);
}

.am-hero-card {
    position: relative;
    border-radius: var(--am-radius);
    overflow: hidden;
    min-height: 260px;
    display: flex;
    text-decoration: none;
    background-color: var(--am-darker);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.am-hero-card:hover { transform: scale(1.01); }

.am-hero-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(15,15,15,0.82) 0%,
        rgba(25,25,25,0.55) 50%,
        rgba(35,35,35,0.35) 100%);
    z-index: 1;
}

.am-hero-card__content {
    position: relative;
    z-index: 2;
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.am-hero-card__title {
    font-family: var(--am-font-heading);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    color: var(--am-text-white);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.am-hero-card__btn {
    display: inline-flex;
    align-items: center;
    background: var(--am-gold);
    color: var(--am-text-white);
    padding: 12px 28px;
    border-radius: 5px;
    font-family: var(--am-font-body);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 24px;
    width: fit-content;
    transition: background 0.3s, transform 0.2s;
}

.am-hero-card:hover .am-hero-card__btn {
    background: var(--am-gold-light);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .am-hero-banners { grid-template-columns: 1fr; }
    .am-hero-card { min-height: 200px; }
    .am-hero-card__content { padding: 28px 24px; }
}


/* ═══════════════════════════════════════════════
   2.  TRUST BAR
   ═══════════════════════════════════════════════ */
.am-trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px var(--am-gutter);
    background: var(--am-bg-white);
    border-bottom: 1px solid var(--am-border-light);
}

.am-trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

.am-trust-item__icon {
    width: 44px;
    height: 44px;
    background: var(--am-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.am-trust-item__icon svg {
    width: 20px;
    height: 20px;
    color: var(--am-gold);
}

.am-trust-item__heading {
    font-family: var(--am-font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--am-dark);
    margin: 0;
}

.am-trust-item__desc {
    font-family: var(--am-font-body);
    font-size: 12px;
    color: var(--am-text-muted);
    margin: 2px 0 0;
}

@media (max-width: 1024px) {
    .am-trust-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .am-trust-bar { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════
   3.  CATEGORIES GRID
   ═══════════════════════════════════════════════ */
.am-categories-grid {
    padding: 48px var(--am-gutter) 56px;
    background: var(--am-bg-white);
}

.am-categories-grid__wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--am-gap);
}

.am-cat-card {
    position: relative;
    border-radius: var(--am-radius);
    overflow: hidden;
    min-height: 200px;
    display: block;
    text-decoration: none;
    background: var(--am-darker);
    transition: transform 0.3s ease;
}

.am-cat-card:hover { transform: translateY(-3px); }

.am-cat-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-cat-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.35) 55%,
        rgba(0,0,0,0.15) 100%
    );
    z-index: 1;
}

.am-cat-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
}

.am-cat-card__title {
    font-family: var(--am-font-heading);
    font-size: 17px;
    font-weight: 800;
    color: var(--am-gold);
    text-transform: uppercase;
    line-height: 1.15;
    letter-spacing: 0.3px;
    margin: 0;
}

.am-cat-card__subtitle {
    font-family: var(--am-font-body);
    font-size: 12px;
    color: var(--am-text-gray);
    margin: 5px 0 0;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .am-categories-grid__wrap { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .am-categories-grid__wrap { grid-template-columns: 1fr; }
    .am-categories-grid { padding: 32px var(--am-gutter) 40px; }
}


/* ═══════════════════════════════════════════════
   4.  SHOP BY BRAND
   ═══════════════════════════════════════════════ */
.am-brands {
    padding: 56px var(--am-gutter);
    background: var(--am-bg-light);
    text-align: center;
}

.am-brands__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.am-brands__logo-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.65;
    transition: opacity 0.3s ease;
    text-decoration: none;
}

.am-brands__logo-item:hover { opacity: 1; }

.am-brands__logo-item img {
    max-height: 36px;
    width: auto;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s;
}

.am-brands__logo-item:hover img { filter: grayscale(0%); }

.am-brands__logo-text {
    font-family: var(--am-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--am-dark);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.am-brands__tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.am-brands__tag {
    padding: 10px 24px;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    font-family: var(--am-font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--am-dark);
    background: var(--am-bg-white);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.am-brands__tag:hover {
    border-color: var(--am-gold);
    color: var(--am-gold);
    background: rgba(200,149,46,0.05);
}


/* ═══════════════════════════════════════════════
   5.  PRODUCT CAROUSEL
   ═══════════════════════════════════════════════ */

/* -- Layout -- */
.am-products {
    padding: 48px var(--am-gutter) 56px;
}

.am-products--light { background: var(--am-bg-white); }
.am-products--dark  { background: var(--am-darkest); }

.am-products__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.am-products__nav {
    display: flex;
    gap: 8px;
}

.am-products__arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #D0D0D0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.am-products__arrow svg { width: 16px; height: 16px; color: var(--am-dark); }

.am-products__arrow:hover {
    border-color: var(--am-gold);
    background: var(--am-gold);
}

.am-products__arrow:hover svg { color: #fff; }

.am-products--dark .am-products__arrow {
    border-color: var(--am-border);
}

.am-products--dark .am-products__arrow svg { color: var(--am-text-white); }

/* -- Scrollable row -- */
.am-products__row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--am-gap);
}

/* Overflow scroll on smaller screens */
@media (max-width: 1200px) {
    .am-products__row {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 8px;
    }

    .am-products__row .am-product-card {
        min-width: 240px;
        max-width: 280px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

@media (max-width: 640px) {
    .am-products__row .am-product-card { min-width: 200px; }
}

/* -- Product card -- */
.am-product-card {
    border-radius: var(--am-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.am-products--light .am-product-card {
    background: var(--am-bg-white);
    border: 1px solid var(--am-border-light);
}

.am-products--dark .am-product-card {
    background: var(--am-card-bg);
    border: 1px solid var(--am-border);
}

.am-product-card:hover {
    transform: translateY(-4px);
}

.am-products--light .am-product-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.am-products--dark .am-product-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

/* Image wrapper */
.am-product-card__img-wrap {
    position: relative;
    display: block;
    height: 200px;
    overflow: hidden;
    text-decoration: none;
}

.am-products--light .am-product-card__img-wrap { background: var(--am-bg-light); }
.am-products--dark .am-product-card__img-wrap  { background: var(--am-darker); }

.am-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.am-product-card:hover .am-product-card__img { transform: scale(1.05); }

/* Badge */
.am-product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--am-gold);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: var(--am-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
    line-height: 1.3;
}

/* Wishlist heart */
.am-product-card__wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}

.am-products--light .am-product-card__wishlist { background: rgba(255,255,255,0.9); }
.am-products--dark .am-product-card__wishlist  { background: rgba(255,255,255,0.1); }

.am-product-card__wishlist svg {
    width: 16px;
    height: 16px;
    color: var(--am-text-muted);
}

.am-product-card__wishlist:hover { background: var(--am-gold); }
.am-product-card__wishlist:hover svg { color: #fff; }

/* Info section */
.am-product-card__info { padding: 16px; }

.am-product-card__name {
    font-family: var(--am-font-body);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    display: block;
    text-decoration: none;
    transition: color 0.2s;
}

.am-products--light .am-product-card__name { color: var(--am-dark); }
.am-products--dark .am-product-card__name  { color: var(--am-text-white); }
.am-product-card__name:hover { color: var(--am-gold); }

/* Stars */
.am-product-card__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.am-star {
    width: 14px;
    height: 14px;
    fill: var(--am-gold);
}

.am-star--empty { fill: #D0D0D0; }
.am-products--dark .am-star--empty { fill: #444; }

/* Price */
.am-product-card__price {
    font-family: var(--am-font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.am-products--light .am-product-card__price { color: var(--am-dark); }
.am-products--dark .am-product-card__price  { color: var(--am-text-white); }

.am-product-card__price del {
    font-size: 14px;
    font-weight: 400;
    color: var(--am-text-muted);
    margin-left: 6px;
}

.am-product-card__price ins {
    text-decoration: none;
}

/* Quick-add button */
.am-product-card__add-btn {
    display: block;
    width: 100%;
    background: var(--am-gold);
    color: #fff;
    padding: 11px;
    border: none;
    border-radius: 5px;
    font-family: var(--am-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.am-product-card__add-btn:hover { background: var(--am-gold-light); color: #fff; }

.am-products__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--am-text-muted);
    font-size: 14px;
}


/* ═══════════════════════════════════════════════
   6.  EXPERT GUIDES
   ═══════════════════════════════════════════════ */
.am-guides {
    padding: 48px var(--am-gutter) 56px;
    background: var(--am-bg-white);
}

.am-guides__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.am-guide-card {
    position: relative;
    border-radius: var(--am-radius);
    overflow: hidden;
    min-height: 280px;
    display: block;
    text-decoration: none;
    background: var(--am-darker);
    transition: transform 0.3s ease;
}

.am-guide-card:hover { transform: translateY(-3px); }

.am-guide-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.am-guide-card:hover .am-guide-card__img { transform: scale(1.05); }

.am-guide-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.2) 60%,
        rgba(0,0,0,0.1) 100%
    );
    z-index: 1;
}

.am-guide-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 2;
}

.am-guide-card__title {
    font-family: var(--am-font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--am-text-white);
    line-height: 1.25;
    margin: 0 0 12px;
}

.am-guide-card__link {
    font-family: var(--am-font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--am-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: letter-spacing 0.2s;
}

.am-guide-card:hover .am-guide-card__link { letter-spacing: 2.5px; }

.am-guides__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--am-text-muted);
}

@media (max-width: 1024px) {
    .am-guides__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .am-guides__grid { grid-template-columns: 1fr; }
    .am-guides { padding: 32px var(--am-gutter) 40px; }
}


/* ═══════════════════════════════════════════════
   7.  FEATURED BANNER
   ═══════════════════════════════════════════════ */
.am-featured-banner {
    position: relative;
    min-height: 280px;
    border-radius: var(--am-radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background-color: var(--am-darker);
    background-size: cover;
    background-position: center;
    margin: 0 var(--am-gutter);
}

.am-featured-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
        rgba(0,0,0,0.78) 0%,
        rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.am-featured-banner__content {
    position: relative;
    z-index: 2;
    padding: 36px 40px;
    max-width: 560px;
}

.am-featured-banner__title {
    font-family: var(--am-font-heading);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: var(--am-text-white);
    line-height: 1.2;
    margin: 0 0 16px;
}

.am-featured-banner__link {
    font-family: var(--am-font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--am-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.am-featured-banner__link:hover { gap: 10px; color: var(--am-gold-light); }


/* ═══════════════════════════════════════════════
   8.  BLOCK EDITOR TWEAKS
   ═══════════════════════════════════════════════ */
.block-editor-block-list__layout [data-type^="acf/automenu"] {
    max-width: none !important;
}

/* Preview placeholders when no image is set */
.am-hero-card:not([style*="background-image"]),
.am-cat-card:not(:has(.am-cat-card__img)),
.am-guide-card:not(:has(.am-guide-card__img)),
.am-featured-banner:not([style*="background-image"]) {
    background: linear-gradient(135deg,
        var(--am-darker) 0%,
        #222 40%,
        var(--am-dark) 100%
    );
}
