/* ============================================================
   CSS Variables — Ace Hardware inspired
   White body · Red accent · Dark green secondary · Clean retail
   ============================================================ */
:root {
    --ax-red:        #cc2228;
    --ax-red-dk:     #a81b20;
    --ax-green:      #1a5c30;
    --ax-green-lt:   #e8f4ec;
    --ax-body:       #f5f5f5;
    --ax-surface:    #ffffff;
    --ax-border:     #e0e0e0;
    --ax-border2:    #d0d0d0;
    --ax-text:       #1c1c1c;
    --ax-text2:      #444444;
    --ax-text3:      #888888;
    --ax-topbar:     #cc2228;
    --ax-radius:     6px;
    --ax-radius-pill:20px;
    --ax-shadow:     0 1px 4px rgba(0,0,0,0.08);
    --ax-shadow-md:  0 3px 14px rgba(0,0,0,0.11);
    --ax-font:       'PingFang SC','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
    --ax-ease:       0.16s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
    font-family: var(--ax-font);
    background: var(--ax-body);
    color: var(--ax-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ax-red); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ===== Layout ===== */
.aw {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

.clearfix::after { content: ''; display: table; clear: both; }

/* ===== TOP RED BAR ===== */
.top-redbar {
    background: var(--ax-topbar);
    height: 5px;
}

/* ===== SITE HEADER ===== */
.site-masthead {
    background: var(--ax-surface);
    border-bottom: 2px solid var(--ax-border);
    padding: 9px 0;
    box-shadow: var(--ax-shadow);
}

.site-masthead-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

/* Brand */
.masthead-brand {
    font-size: 1.46rem;
    font-weight: 900;
    color: var(--ax-red);
    font-style: normal;
    text-decoration: none;
    border: none;
    letter-spacing: -0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.masthead-brand:hover { color: var(--ax-red-dk); }

/* Domain badge — pill style like Ace's category pills */
.masthead-domain {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid var(--ax-border2);
    border-radius: var(--ax-radius-pill);
    padding: 4px 14px;
    flex-shrink: 0;
}
.masthead-domain-lbl {
    font-size: 0.68rem;
    color: var(--ax-text3);
    white-space: nowrap;
}
.masthead-domain-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ax-text);
}

/* ===== CATEGORY NAV ===== */
.zone-nav-wrap {
    background: var(--ax-surface);
    border-bottom: 2px solid var(--ax-border);
}

.zone-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--ax-border);
    min-height: 36px;
}
.zone-nav-row:last-child { border-bottom: none; }

.zone-label {
    width: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ax-green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
    padding: 4px 2px;
    line-height: 1.2;
}

.zone-entries {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 3px 6px;
    gap: 3px;
}

.zone-entries a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: var(--ax-radius-pill);
    border: 1px solid var(--ax-border);
    font-size: 0.82rem;
    color: var(--ax-text2);
    transition: background var(--ax-ease), color var(--ax-ease), border-color var(--ax-ease);
    white-space: nowrap;
    flex: 1;
    text-align: center;
    min-width: 0;
}
.zone-entries a:hover {
    background: var(--ax-red);
    color: #fff;
    border-color: var(--ax-red);
}
.zone-entries a.active {
    background: var(--ax-red);
    color: #fff;
    border-color: var(--ax-red);
    font-weight: 700;
}

/* ===== SEARCH BAR ===== */
.srch-zone {
    background: var(--ax-surface);
    padding: 9px 0;
    border-bottom: 1px solid var(--ax-border);
}

.srch-bar-form {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
}

.srch-bar-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 14px;
    border: 1.5px solid var(--ax-border2);
    border-radius: var(--ax-radius-pill);
    font-size: 0.88rem;
    font-family: var(--ax-font);
    color: var(--ax-text);
    background: var(--ax-surface);
    outline: none;
    transition: border-color var(--ax-ease);
}
.srch-bar-form input[type="text"]:focus {
    border-color: var(--ax-red);
}

.srch-bar-form button {
    padding: 8px 13px;
    border: none;
    border-radius: var(--ax-radius-pill);
    font-size: 0.82rem;
    font-family: var(--ax-font);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity var(--ax-ease);
    flex-shrink: 0;
    font-weight: 600;
}
.srch-bar-form button:not([value]) {
    background: var(--ax-green);
    color: #fff;
}
.srch-bar-form button[value="1"] {
    background: var(--ax-red);
    color: #fff;
}
.srch-bar-form button[value="2"] {
    background: var(--ax-text);
    color: #fff;
}
.srch-bar-form button:hover { opacity: 0.82; }

/* ===== HOT TAGS ===== */
.hot-cats-box {
    background: var(--ax-surface);
    border-radius: var(--ax-radius);
    border: 1px solid var(--ax-border);
    padding: 8px 13px;
    margin: 5px 0;
    box-shadow: var(--ax-shadow);
}
.hot-cats-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ax-text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0;
    margin: 0;
}
.pill-tag-lnk {
    display: inline-block;
    padding: 3px 11px;
    background: var(--ax-body);
    border: 1.5px solid var(--ax-border2);
    border-radius: var(--ax-radius-pill);
    font-size: 0.78rem;
    color: var(--ax-text2);
    transition: all var(--ax-ease);
}
.pill-tag-lnk:hover {
    background: var(--ax-red);
    color: #fff;
    border-color: var(--ax-red);
}

/* ===== SECTION CARD ===== */
.media-section {
    background: var(--ax-surface);
    border-radius: var(--ax-radius);
    border: 1px solid var(--ax-border);
    box-shadow: var(--ax-shadow);
    margin: 6px 0;
    overflow: hidden;
}

.media-sec-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px 8px;
    border-bottom: 2px solid var(--ax-border);
    background: var(--ax-surface);
}

.media-sec-ttl {
    font-size: 0.97rem;
    font-weight: 800;
    color: var(--ax-text);
    padding-left: 10px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}
.media-sec-ttl::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1em;
    background: var(--ax-red);
    border-radius: 2px;
}
.media-sec-ttl a { color: inherit; }
.media-sec-ttl a:hover { color: var(--ax-red); }

/* ===== FILM GRID ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px 12px;
    margin: 0;
    list-style: none;
}

.media-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--ax-radius);
    overflow: hidden;
    background: var(--ax-body);
    border: 1px solid var(--ax-border);
    transition: transform var(--ax-ease), box-shadow var(--ax-ease);
}
.media-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ax-shadow-md);
}

.media-cover {
    display: block;
    position: relative;
    overflow: hidden;
    background: #ccc;
    aspect-ratio: 600 / 350;
}
.media-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.26s ease;
}
.media-card:hover .media-cover img {
    transform: scale(1.05);
}

.media-body {
    padding: 5px 7px 6px;
}
.media-body h5 {
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--ax-text);
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.media-body h5 a { color: inherit; }
.media-body h5 a:hover { color: var(--ax-red); }

/* ===== DETAIL TITLE BAR ===== */
.detail-heading {
    background: var(--ax-green);
    color: #fff;
    text-align: center;
    padding: 14px 16px;
    border-radius: var(--ax-radius);
    margin: 7px 0;
    font-size: 1rem;
    line-height: 1.75;
    word-break: break-all;
}
.detail-heading .cat-href {
    color: #ffd700;
    font-weight: 700;
    margin-right: 8px;
}
.detail-heading .cat-href:hover { color: #ffe84d; }

.detail-specs {
    background: var(--ax-surface);
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    padding: 18px 20px;
    font-size: 0.92rem;
    line-height: 1.95;
    margin: 6px 0;
    box-shadow: var(--ax-shadow);
}

.preview-frame { margin-top: 10px; }
.preview-frame picture,
.preview-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--ax-radius);
}

/* ===== DOWNLOAD BUTTONS ===== */
.action-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 26px;
    border-radius: var(--ax-radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: var(--ax-font);
    transition: opacity var(--ax-ease);
    text-decoration: none;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.action-btn:hover { opacity: 0.85; }
.abtn-red    { background: var(--ax-red);   color: #fff; }
.abtn-green  { background: var(--ax-green); color: #fff; }
.abtn-dark   { background: var(--ax-text);  color: #fff; }
.abtn-outline {
    background: transparent;
    color: var(--ax-red);
    border: 2px solid var(--ax-red);
}
.abtn-outline:hover { background: var(--ax-red); color: #fff; opacity: 1; }

/* ===== CLIENT DOWNLOAD ===== */
.client-link { text-align: center; padding: 7px 0; }
.client-link a { color: var(--ax-red); font-size: 0.85rem; font-weight: 600; }
.client-link a:hover { text-decoration: underline; }

/* ===== SHARE STRIP ===== */
.share-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    background: var(--ax-body);
    border: 1.5px solid var(--ax-border2);
    border-radius: var(--ax-radius);
    margin: 7px 0;
    flex-wrap: wrap;
}
.share-url-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
}
.share-lbl { font-size: 0.74rem; color: var(--ax-text3); white-space: nowrap; flex-shrink: 0; }
.share-url-val {
    font-size: 0.78rem;
    color: var(--ax-text2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--ax-red);
    color: #fff;
    border: none;
    border-radius: var(--ax-radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--ax-font);
    transition: background var(--ax-ease);
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.share-copy-btn:hover { background: var(--ax-red-dk); }

/* ===== PAGINATION ===== */
.pg-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 13px 0 5px;
}
.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--ax-radius);
    font-size: 0.84rem;
    background: var(--ax-surface);
    border: 1.5px solid var(--ax-border2);
    color: var(--ax-text2);
    font-weight: 600;
    transition: all var(--ax-ease);
}
.pg-btn:hover { background: var(--ax-red); border-color: var(--ax-red); color: #fff; }
.pg-btn-cur {
    background: var(--ax-red);
    border-color: var(--ax-red);
    color: #fff;
    font-weight: 700;
    pointer-events: none;
}

/* ===== FOOTER LINKS ===== */
.foot-links-block {
    background: var(--ax-surface);
    border-radius: var(--ax-radius);
    border: 1px solid var(--ax-border);
    margin: 6px 0;
    overflow: hidden;
    box-shadow: var(--ax-shadow);
}
.foot-links-dl {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
    margin: 0;
}
.foot-links-dl dd { margin: 0; }
.foot-links-dl a {
    display: inline-block;
    padding: 3px 9px;
    font-size: 0.77rem;
    color: var(--ax-text2);
    border-radius: 4px;
    transition: all var(--ax-ease);
}
.foot-links-dl a:hover { background: var(--ax-red); color: #fff; }

/* ===== SITE FOOTER ===== */
.site-foot {
    background: var(--ax-green);
    color: rgba(255,255,255,0.6);
    padding: 12px 0;
    margin-top: 8px;
}
.site-foot-copy {
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.75;
}

/* ===== VISIBILITY ===== */
.desk-only   { display: block; }
.mob-only    { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Mobile ≤767px */
@media (max-width: 767px) {
    .desk-only  { display: none !important; }
    .mob-only   { display: block !important; }

    .masthead-brand      { font-size: 1.05rem; }
    .masthead-domain-val { font-size: 0.85rem; }
    .masthead-domain-lbl { font-size: 0.62rem; }

    /* Zone nav: 15% label / 85% links, 4 per row */
    .zone-label {
        width: 15%;
        min-width: 0;
        font-size: 10px;
        letter-spacing: 0;
        padding: 3px 1px;
        line-height: 1.2;
    }
    .zone-entries {
        width: 85%;
        flex: none;
        padding: 3px 3px;
        gap: 2px;
    }
    .zone-entries a {
        flex: 0 0 calc(25% - 2px);
        font-size: 12px;
        padding: 3px 1px;
        text-align: center;
        border-radius: 10px;
    }

    /* Search: no wrap */
    .srch-bar-form { flex-wrap: nowrap; gap: 4px; }
    .srch-bar-form input[type="text"] { font-size: 0.78rem; padding: 6px 10px; }
    .srch-bar-form button { font-size: 0.72rem; padding: 6px 6px; flex-shrink: 0; }

    /* Film grid: 2 cols */
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
        padding: 8px;
    }
    .media-body h5 { font-size: 0.72rem; }
}

/* Large phones 480-767 */
@media (min-width: 480px) and (max-width: 767px) {
    .zone-entries a { font-size: 13px; }
}
@media (max-width: 479px) {
    .zone-entries a { font-size: 12px; }
}

/* PC ≥768px */
@media (min-width: 768px) {
    .media-grid { grid-template-columns: repeat(4, 1fr); }
    .zone-label   { width: 70px; font-size: 0.74rem; }
    .zone-entries { display: flex; flex-wrap: nowrap; }
    .zone-entries a { flex: 1; font-size: 0.86rem; border-radius: var(--ax-radius-pill); }
}
