* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(155deg, #0e2140 0%, #0b1a30 55%, #091528 100%);
    color: white;
    padding: 1rem 2rem;
    border-bottom: 4px solid #cc0000;
}

.site-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-logo {
    height: 163px;
    width: 163px;
    object-fit: contain;
    flex-shrink: 0;
}

.site-header-text {
    flex: 1;
    text-align: center;
}

.site-header-text h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    letter-spacing: 0.01em;
}

.site-header-text p {
    font-size: 0.9rem;
    color: #b9c4d6;
    margin: 0.4rem 0 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.site-header-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: right;
}

.site-header-contact-text {
    font-size: 0.8rem;
    color: #b9c4d6;
    line-height: 1.4;
}

@media (max-width: 760px) {
    header {
        padding: 1.5rem 1.25rem;
    }
    .site-header-inner {
        flex-direction: column;
        gap: 0.75rem;
    }
    .site-logo {
        height: 127px;
        width: 127px;
    }
    .site-logo-iaff {
        display: none;
    }
    .site-header-text h1 {
        font-size: 1.6rem;
    }
    .site-header-text p {
        font-size: 0.7rem;
        letter-spacing: 0.08em;
    }
    .site-header-contact {
        justify-content: center;
        text-align: center;
    }
}

nav {
    background-color: #cc0000;
    padding: 0.5rem;
    text-align: right;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    display: inline-block;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background-color: #f1f1f1;
    padding: 1rem;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0b1a30;
}

.product-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #cc0000;
    margin-bottom: 1rem;
}

.btn {
    display: block;
    width: 100%;
    background-color: #0b1a30;
    color: white;
    text-align: center;
    padding: 0.75rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #cc0000;
}

/* Modal for Password */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 2rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

input[type=password] {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.alert-bar {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #ffeeba;
    font-weight: bold;
}

/* Cart button in nav */
nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.cart-nav-btn {
    position: relative;
    background: none;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
}

.cart-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.cart-badge {
    display: none;
    align-items: center;
    justify-content: center;
    background-color: #0b1a30;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    padding: 0 4px;
    position: relative;
    top: -1px;
}

.size-select {
    font-family: inherit;
}

.size-select-error {
    border-color: #cc0000 !important;
    outline: 2px solid #cc0000;
}

/* Cart drawer */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.cart-overlay.open {
    display: block;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: white;
    z-index: 101;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.25s ease;
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
    background-color: #0b1a30;
    color: white;
}

.cart-drawer-header h2 {
    font-size: 1.2rem;
}

.cart-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-row-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background-color: #f1f1f1;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-row-info {
    flex-grow: 1;
}

.cart-row-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #0b1a30;
}

.cart-row-size {
    font-weight: normal;
    color: #666;
}

.cart-row-price {
    font-size: 0.8rem;
    color: #666;
}

.cart-row-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.cart-qty-btn {
    width: 22px;
    height: 22px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}

.cart-qty-val {
    font-size: 0.85rem;
    min-width: 16px;
    text-align: center;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: #cc0000;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 0.5rem;
    text-decoration: underline;
}

.cart-row-total {
    font-weight: bold;
    font-size: 0.9rem;
    color: #0b1a30;
    white-space: nowrap;
}

.cart-drawer-footer {
    padding: 1.25rem;
    border-top: 1px solid #eee;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    color: #0b1a30;
    margin-bottom: 0.5rem;
}

#cartCheckoutBtn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Product image lightbox */
.product-image {
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.product-image:hover {
    opacity: 0.85;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 480px;
    max-height: 480px;
    width: 90%;
    background-color: #f1f1f1;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #0b1a30;
    color: white;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

/* Homepage */
.home-nav {
    background-color: white;
    border-bottom: 1px solid #e2e2e2;
    position: sticky;
    top: 0;
    z-index: 10;
}

.home-nav-links {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
}

.home-nav-links a {
    color: #0b1a30;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
}

.home-nav-links a:hover {
    color: #cc0000;
}

.home-nav-links .home-nav-cta {
    background-color: #cc0000;
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: 4px;
}

.home-nav-links .home-nav-cta:hover {
    background-color: #a60000;
    color: white;
}

.home-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1rem;
    scroll-margin-top: 64px;
}

.home-section h2 {
    color: #0b1a30;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    border-bottom: 3px solid #cc0000;
    display: inline-block;
    padding-bottom: 0.3rem;
}

.home-section p {
    color: #444;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.officers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.officer-card {
    background: white;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.officer-card .officer-position {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cc0000;
    font-weight: bold;
    margin-bottom: 0.4rem;
}

.officer-card .officer-name {
    font-size: 1.15rem;
    font-weight: bold;
    color: #0b1a30;
}

.bylaws-box {
    background-color: #f8f9fa;
    border-left: 4px solid #0b1a30;
    padding: 1.25rem;
    border-radius: 4px;
}

.social-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: #0b1a30;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

.social-link:hover {
    background-color: #cc0000;
}

.site-footer {
    background-color: #0b1a30;
    color: #b9c4d6;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.site-footer strong {
    color: white;
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.site-footer a {
    color: #b9c4d6;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.benefit-card {
    background: white;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.benefit-card h3 {
    color: #0b1a30;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.benefit-card p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.benefit-card a {
    color: #cc0000;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
}

.benefit-card a:hover {
    text-decoration: underline;
}

.news-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid #e2e2e2;
    text-decoration: none;
    color: inherit;
}

.news-item:hover .news-item-title {
    color: #cc0000;
    text-decoration: underline;
}

.news-item-title {
    font-weight: 600;
    color: #0b1a30;
}

.news-item-date {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

.fire-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fire-status-card {
    background: white;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.fire-status-card h3 {
    color: #0b1a30;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.fire-danger-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.fire-status-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.75rem;
}

.restriction-list {
    text-align: left;
}

.restriction-row {
    padding: 0.85rem 0;
    border-bottom: 1px solid #eee;
}

.restriction-row:last-child {
    border-bottom: none;
}

.restriction-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.restriction-county {
    font-weight: bold;
    color: #0b1a30;
    font-size: 0.95rem;
}

.restriction-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-weight: bold;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.restriction-chip-info {
    background-color: #e2e8f2;
    color: #0b1a30;
}

.restriction-chip-moderate {
    background-color: #fff3cd;
    color: #856404;
}

.restriction-chip-high {
    background-color: #ffe5d0;
    color: #a34b00;
}

.restriction-chip-extreme {
    background-color: #f8d7da;
    color: #842029;
}

.restriction-detail {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.weather-card {
    background: white;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.weather-card h3 {
    color: #0b1a30;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.weather-elevation {
    color: #cc0000;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.weather-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.weather-temp {
    font-size: 2rem;
    font-weight: 800;
    color: #0b1a30;
    line-height: 1;
    margin: 0.25rem 0;
}

.weather-forecast {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.weather-wind {
    font-size: 0.8rem;
    color: #888;
}

.weather-period {
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}
