/* =========================
   GLOBAL
   ========================= */
html,
body {
    margin: 0;
    padding: 0;
    color: #000;
    font-family: system-ui, sans-serif;
    text-align: left;
    letter-spacing: -0.25px;
}

a {
    color: #000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* =========================
   HEADER
   ========================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    z-index: 1000;
}

header h1 {
    margin: 0 0 0;
    font-size: 64px;
    font-weight: 800;
    line-height: 0.65;
}

header a:hover {
    text-decoration: none;
}

/* =========================
   NAV
   ========================= */
nav {
    position: fixed;
    top: 32px;
    right: 24px;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 16px;
}

nav a {
    font-size: 12px;
}

/* =========================
   MAIN
   ========================= */
main {
    padding: 90px 0 42px;
}

.description {
    padding: 0 32px;
}

.description p {
    max-width: 590px;
    font-size: 15px;
    line-height: 1.1;
    margin: 0 0 24px;
    font-weight: 800;
}

/* =========================
   GRID
   ========================= */
.grid {
    display: grid;
    gap: 16px;
    padding: 0 24px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.item {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.subtitle {
    font-size: 13px;
    margin: 0;
    padding: 0;
}

.dimensions {
    font-size: 12px;
    color: #636363;
    margin-top: 2px;
    padding: 0;
}

.image-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #fefefe;
}

.image-placeholder img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================
   FOOTER
   ========================= */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding: 4px 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 4px 16px;
}

.footer-links {
    display: contents;
}

.footer-links a {
    font-size: 12px;
    color: #000;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-year {
    width: 100%;
    font-size: 10px;
    font-weight: 400;
    text-align: center;
    color: #636363;
    margin: 0;
    padding: 0;
}

.footer-year p {
    margin: 0;
    padding: 0;
}

/* =========================
   PRODUCT PAGE
   ========================= */
.product-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    padding: 42px 32px;
    margin: 0 auto;
    max-width: 1200px;
}

.gallery {
    flex: 0 0 65%;
    min-width: 400px;
}

.gallery img {
    width: 100%;
    padding-bottom: 32px;
    object-fit: contain;
}

.product-details {
    flex: 0 0 25%;
    min-width: 280px;
    font-size: 13px;
    line-height: 1.1;
    position: sticky;
    top: 100px;
    font-weight: 400;
    align-self: flex-start;
}

.product-details h2 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 400;
}

.product-details p {
    margin: 4px 0 12px;
}

.specs,
.specs-dark {
    font-size: 12px;
}

.specs {
    color: #636363;
}

.specs-dark {
    color: #000;
}

.add-to-cart,
.checkout-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    margin-right: 10px;
}

.add-to-cart:hover,
.checkout-btn:hover {
    background: #333;
}

.remove-from-cart {
    background: transparent;
    color: #000;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
}

.remove-from-cart:hover {
    text-decoration: underline;
}

/* =========================
   GOOGLE AUTOCOMPLETE
   ========================= */
.pac-container {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: "Helvetica Neue", Arial, sans-serif;
    z-index: 10000 !important;
}

.pac-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.pac-item:hover {
    background: #f5f5f5;
}

.pac-item-query {
    font-weight: bold;
    color: #000;
}

.pac-icon {
    display: none;
}

/* =========================
   CHECKOUT MODAL
   ========================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.modal-content {
    background: #fff;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.modal-header h2 {
    font-family: 'neue-montreal', sans-serif;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 8px;
}

.order-summary {
    background: #f8f8f8;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 0;
}

.order-summary h3 {
    font-family: 'neue-montreal', sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 15px;
    letter-spacing: 0.5px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.item-details h4 {
    font-size: 12px;
    font-weight: 500;
    margin: 0 0 3px;
}

.item-details p {
    font-size: 11px;
    color: #666;
    margin: 1px 0;
}

.item-price {
    font-size: 12px;
    font-weight: 500;
}

.order-total {
    margin-top: 15px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.final-total {
    border-top: 1px solid #000;
    padding-top: 8px;
    font-weight: 500;
    font-size: 14px;
}

.checkout-form {
    padding-right: 10px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 15px;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half,
.form-group.third {
    flex: 1;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 8px 12px 12px;
    border: 1px solid #ddd;
    background: #fff;
    font-family: 'neue-montreal', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #000;
}

.complete-order-btn {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 20px;
}

.complete-order-btn:hover {
    background: #333;
}

.complete-order-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.email-error {
    display: none;
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
}

.email-error.show {
    display: block;
}

.form-group input.error {
    border-color: #d32f2f;
}

.payment-instructions {
    background: #f8f8f8;
    border-left: 2px solid #000;
    padding: 16px;
    margin-bottom: 16px;
}

.payment-instructions p {
    font-size: 13px;
    margin: 0;
    color: #333;
    line-height: 1.5;
}

/* Toast container — centered at top */
#toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: none;
}

/* Toast message box */
.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    border-radius: 4px;
    font-family: 'pp_neue_montrealbook', sans-serif;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 1;
    color: #000;
    /* always black text */
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 500px;
    border-left: 7px solid transparent;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    text-align: center;
}

/* Show animation */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Variants */
.toast.success {
    border-left-color: #008000;
    background-color: #fff;
}

.toast.error {
    border-left-color: #9B111E;
    background-color: #fdeaea;
}

/* Close button */
.toast-close {
    background: none;
    border: none;
    color: #000;
    font-size: 20px;
    margin-left: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
}


/* =========================
   TERMS PAGE
   ========================= */
.terms-main {
    max-width: 780px;
    margin: 0 auto;
    padding: 4rem 4rem;
    min-height: 100vh;
}

.TermsHeader p {
    font-size: 32px;
    font-weight: 800;
    text-align: left;
    color: #999;
    margin: 0;
    padding-bottom: 16px;
    padding-top: 42px;
}

.terms-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 0;
    font-size: 0.85rem;
    line-height: 1.2;
    color: #999;
    font-weight: 400;
}

.terms-content h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0rem;
    margin-top: 0;
    color: #999;
    padding-bottom: 0;
    text-transform: none;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content p {
    margin-bottom: 1rem;
    text-align: left;
    color: #999;
}

.terms-content ul {
    background-color: white;
}

.terms-content li {
    color: #999;
    padding-bottom: 8px;
}

.terms-content strong {
    font-weight: 400;
    color: #999;
}

.terms-content .contact-email {
    color: #000000;
    text-decoration: none;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
    header {
        padding: 24px 16px;
    }

    header h1 {
        font-size: 38px;
    }

    nav {
        top: 16px;
        right: 16px;
    }

    main {
        padding: 64px 0 80px;
    }

    .description,
    .grid {
        padding: 0 16px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 16px;
    }

    .product-container {
        flex-direction: column;
        gap: 32px;
        padding: 0 16px;
        max-width: 100%;
    }

    .gallery,
    .product-details {
        flex: 1 1 auto;
        position: relative;
        top: auto;
    }

    body.modal-open footer {
        display: none;
    }

    .modal-overlay {
        align-items: flex-start;
        padding: 0;
    }

    .modal-content {
        margin-top: 0;
        max-height: 100vh;
        width: 100%;
        border-radius: 0;
    }

    .modal-header {
        padding: 15px 15px 12px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .checkout-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 15px;
    }

    .checkout-form {
        order: 1;
        padding-right: 0;
        margin-bottom: 20px;
    }

    .order-summary {
        order: 2;
        padding: 15px;
        border-top: 2px solid #000;
        margin: 0 -15px -15px;
        border-radius: 0;
        background: #fff;
        position: sticky;
        bottom: 0;
    }

    .modal-footer {
        display: none;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .form-group.half,
    .form-group.third {
        flex: none;
    }

    .form-group input {
        padding: 14px 12px;
        font-size: 16px;
    }

    #country {
        padding: 14px 8px 14px 12px;
        font-size: 16px;
    }

    /* TERMS PAGE adjustments */
    .terms-main {
        padding: 1rem;
        margin-bottom: 42px;
    }

    .terms-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        font-size: 0.8rem;
    }

    .terms-content h3 {
        font-size: 0.95rem;
        margin-top: 2rem;
    }

    .TermsHeader p {
        font-size: 24px;
        font-weight: 800;
        color: #b8b8b8;
        margin: 0;
        padding-top: 64px;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        padding: 10px;
    }

    .order-summary {
        padding: 12px;
        margin: 0 -12px -12px;
    }

    .form-group input,
    .form-group select {
        padding: 12px 10px;
    }

    /* TERMS PAGE small screen */
    .terms-main {
        padding: 1rem;
    }

    .terms-content {
        font-size: 0.75rem;
        gap: 1.5rem;
    }

    .terms-content h3 {
        font-size: 0.5rem;
    }

    .description p {
        font-size: 15px;
    }
}

@media (max-width: 320px) {

    header,
    nav {
        display: none;
    }

    .modal-header {
        padding: 10px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .checkout-container {
        padding: 10px;
    }

    .order-summary {
        padding: 10px;
        margin: 0 -10px -10px;
    }

    .form-group input,
    .form-group select {
        padding: 10px 8px;
    }
}

@media (min-width: 1024px) {
    .modal-overlay {
        align-items: center;
        justify-content: center;
    }

    .checkout-container {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
}

@media screen and (min-width: 768px) {
    #checkout-modal .modal-footer {
        display: none !important;
    }
}

/* TERMS PAGE wide screens */
@media (max-width: 1200px) {
    .terms-main {
        padding: 3rem 4rem;
    }

    .terms-content {
        gap: 4rem;
    }
}

@media (max-width: 900px) {
    .terms-main {
        padding: 3rem 1.5rem;
    }

    .description p {
        font-size: 15px;
        margin-bottom: 2rem;
    }

    .terms-content {
        gap: 3rem;
    }
}

/* =========================
   PRODUCT PAGE FADE-IN
   ========================= */
body.product-page {
  opacity: 0;
  transition: opacity 2s cubic-bezier(.5, 0.8, 0.5, 1);
}

body.product-page.loaded {
  opacity: 1;
}