/* ============================================================
   AnodeSales – Storefront Styles
   Light theme · Galvotec green #1a6b2a
   ============================================================ */

:root {
    --green:       #1a6b2a;
    --green-dark:  #145222;
    --green-light: #e8f5e9;
    --green-muted: #4a8c5c;
    --gray-50:     #fafbfc;
    --gray-100:    #f3f5f7;
    --gray-200:    #e4e8ec;
    --gray-300:    #cdd4db;
    --gray-400:    #9aa5b1;
    --gray-600:    #5a6872;
    --gray-800:    #2d3748;
    --gray-900:    #1a202c;
    --white:       #ffffff;
    --danger:      #c62828;
    --radius:      6px;
    --radius-lg:   10px;
}

* { box-sizing: border-box; }

body {
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

img { max-width: 100%; height: auto; }

/* ---------- Utility Bar ---------- */
.util-bar {
    background: var(--green-dark);
    color: rgba(255,255,255,0.75);
    font-size: 11px;
    padding: 7px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.4px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.site-logo-text h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 21px;
    margin: 0;
    line-height: 1.1;
    font-weight: 400;
}

.site-logo-text small {
    font-size: 9px;
    color: var(--gray-400);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input {
    padding: 9px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-800);
    font-size: 13px;
    width: 220px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}

.search-input:focus {
    border-color: var(--green);
}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-200);
    background: none;
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-800);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s;
}

.cart-btn:hover { border-color: var(--green); }

.cart-badge {
    background: var(--green);
    color: #fff;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 5px;
}

/* ---------- Hero ---------- */
.hero {
    background: var(--gray-50);
    padding: 52px 24px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.hero h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 34px;
    font-weight: 400;
    margin: 0 0 14px;
    line-height: 1.25;
}

.hero p {
    color: var(--gray-600);
    font-size: 15px;
    max-width: 540px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

.trust-badges {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
}

.trust-badge .badge-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--green-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* ---------- Category Filter ---------- */
.cat-filters {
    padding: 24px 24px 0;
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    background: var(--gray-100);
    color: var(--gray-600);
    transition: all 0.15s;
}

.cat-btn:hover { background: var(--gray-200); }

.cat-btn.active {
    background: var(--green);
    color: #fff;
}

/* ---------- Toolbar ---------- */
.toolbar {
    padding: 14px 24px 0;
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-count { font-size: 13px; color: var(--gray-400); }

/* ---------- Product Grid ---------- */
.product-grid {
    padding: 16px 24px 56px;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.product-image {
    height: 130px;
    background: var(--green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gray-200);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .placeholder {
    text-align: center;
}

.product-image .placeholder .sku-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

.product-body {
    padding: 16px 20px 20px;
}

.product-cat-label {
    font-size: 10px;
    color: var(--green-muted);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-body h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
}

.product-body h3 a {
    color: var(--gray-900);
}
.product-body h3 a:hover {
    color: var(--green);
}

.product-app {
    font-size: 12px;
    color: var(--gray-600);
    margin: 0 0 14px;
    line-height: 1.5;
}

.product-specs {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.8;
}

.product-specs .spec-row {
    display: flex;
    justify-content: space-between;
}

.spec-row .spec-label { color: var(--gray-400); }
.spec-row .spec-value { font-weight: 600; color: var(--gray-800); }
.spec-row .spec-value.highlight { color: var(--green); }

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.product-price .dollar {
    font-size: 15px;
    font-weight: 500;
    vertical-align: top;
    margin-right: 1px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.3px;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-primary {
    background: var(--green);
    color: #fff;
}
.btn-primary:hover { background: var(--green-dark); }

.btn-outline {
    background: transparent;
    color: var(--green);
    border: 1.5px solid var(--green);
}
.btn-outline:hover {
    background: var(--green-light);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }

.btn-block { width: 100%; }

/* ---------- Cart Page ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0;
    border-bottom: 2px solid var(--gray-200);
}
.cart-table td {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}
.qty-control button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-50);
    cursor: pointer;
    font-size: 15px;
    color: var(--gray-600);
}
.qty-control button:hover { background: var(--gray-100); }
.qty-control .qty-value {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    line-height: 32px;
}

.cart-summary {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.cart-summary .summary-total {
    border-top: 2px solid var(--gray-900);
    margin-top: 12px;
    padding-top: 12px;
    font-size: 20px;
    font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer-info {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 48px 24px;
}

.footer-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
}

.footer-heading {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.footer-text { font-size: 13px; color: var(--gray-600); line-height: 1.7; }
.footer-links { font-size: 13px; line-height: 2.2; }
.footer-links a { color: var(--green); }
.footer-links a:hover { text-decoration: underline; }

.site-footer-bottom {
    border-top: 1px solid var(--gray-200);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--gray-400);
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-800);
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: var(--gray-50);
    transition: border-color 0.15s;
}
.form-control:focus { border-color: var(--green); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
}
.alert-success { background: var(--green-light); color: var(--green-dark); }
.alert-danger  { background: #fdecea; color: var(--danger); }

/* ---------- Page Wrapper ---------- */
.page-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 56px;
}

.page-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 24px;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--gray-400);
}

/* ---------- Modal Backdrop ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.15);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-400);
    cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .util-bar { flex-direction: column; gap: 2px; text-align: center; }
    .site-header { padding: 0 16px; height: 60px; }
    .search-input { width: 140px; }
    .hero h1 { font-size: 26px; }
    .product-grid { grid-template-columns: 1fr; padding: 16px 16px 40px; }
    .cat-filters { padding: 16px 16px 0; }
    .page-wrap { padding: 24px 16px 40px; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .header-actions .search-input { display: none; }
    .trust-badges { flex-direction: column; align-items: center; gap: 10px; }
}

/* ---------- Image Gallery ---------- */
.gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-main {
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    background: var(--green-light);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 400px;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    border: 2px solid var(--gray-200);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.gallery-thumb:hover, .gallery-thumb.active {
    border-color: var(--green);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Volume Pricing ---------- */
.price-tiers {
    margin-bottom: 16px;
}

.price-tiers-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.price-tiers-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.price-tier {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 6px 10px;
    text-align: center;
    flex: 1;
    min-width: 70px;
    transition: all 0.15s;
}

.price-tier-active {
    border-color: var(--green);
    background: var(--green-light);
}

.price-tier-qty {
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 600;
    margin-bottom: 2px;
}

.price-tier-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
}

.price-tier-save {
    font-size: 9px;
    color: var(--green);
    font-weight: 700;
    margin-top: 1px;
}

/* Card-level price tiers (compact) */
.price-tiers-inline {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.price-tiers-inline .pti {
    font-size: 10px;
    color: var(--gray-400);
    background: var(--gray-50);
    border-radius: 3px;
    padding: 2px 6px;
}

.price-tiers-inline .pti strong {
    color: var(--gray-800);
}
