
/* ======================================== */
/* SUMMIT FLOORING SUPPLY                   */
/* GJP ADVANCED CATALOG DEMONSTRATION       */
/* ======================================== */

:root {
    --forest: #24483C;
    --forest-dark: #18352B;
    --slate: #28343C;
    --copper: #B47E56;
    --ivory: #F5F3EE;
    --white: #FFFFFF;
    --text: #28343C;
    --muted: #68736E;
    --border: #DDE2DC;
    --max-width: 1440px;
}


/* GLOBAL FOUNDATION */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--ivory);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: default;
    opacity: 0.45;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid var(--copper);
    outline-offset: 4px;
}

.container {
    max-width: var(--max-width);
    margin: auto;
}

.section {
    padding: 90px 32px;
}

.eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--forest);
    margin-bottom: 16px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s ease;
}

.primary {
    background: var(--forest);
    color: white;
}

.primary:hover {
    background: var(--forest-dark);
}

.secondary {
    background: white;
    border-color: var(--border);
    color: var(--text);
}

.secondary:hover {
    background: var(--ivory);
}

.outline {
    background: transparent;
    color: inherit;
    border-color: currentColor;
}

.text-button {
    background: transparent;
    border: none;
    color: var(--forest);
    font-size: 0.8rem;
    text-decoration: underline;
}


/* ======================================== */
/* DEMONSTRATION BANNER                     */
/* ======================================== */

.demo-banner {
    background: #101C2B;
    color: white;
    padding: 10px 28px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.72rem;
}

.demo-banner span {
    color: #C8A978;
    font-weight: 700;
    letter-spacing: 1px;
}

.demo-banner a:hover {
    text-decoration: underline;
}


/* ======================================== */
/* HEADER                                   */
/* ======================================== */

.site-header {
    background: white;
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: var(--max-width);
    margin: auto;
    padding: 22px 32px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 4px;
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1.2;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    background: var(--forest);
    color: white;
    font-family: Georgia, serif;
    font-size: 2rem;
}

.brand small {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 2px;
}

.navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.navigation a {
    font-size: 0.85rem;
    font-weight: 600;
}

.navigation a:hover {
    color: var(--copper);
}

.header-button {
    background: var(--forest);
    color: white;
    padding: 11px 17px;
    border: none;
    border-radius: 4px;
}

#quote-count {
    background: white;
    color: var(--forest);
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
}


/* ======================================== */
/* HERO                                     */
/* ======================================== */

.hero {
    position: relative;
    padding: 130px 32px;
    color: white;
    background-color: var(--forest-dark);
    background-image: linear-gradient(
        115deg,
        #18352B,
        #24483C 65%,
        #47665A
    );
}

.hero.has-photo {
    background-image:
        linear-gradient(
            90deg,
            rgba(24, 53, 43, 0.96),
            rgba(24, 53, 43, 0.55)
        ),
        url("images/hero.jpg");
    background-size: cover;
    background-position: center;
}

.hero-container {
    max-width: var(--max-width);
    margin: auto;
}

.hero .eyebrow {
    color: #DBB99F;
}

.hero h1 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    max-width: 950px;
    line-height: 1.08;
    letter-spacing: -2px;
}

.hero h1 span {
    display: block;
    color: #DBB99F;
}

.hero-description {
    max-width: 600px;
    color: #DCE6E0;
    font-size: 1.1rem;
    margin: 28px 0 34px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero .primary {
    background: var(--copper);
    color: #18251F;
}

.hero .primary:hover {
    background: #D0A383;
}


/* BUSINESS HIGHLIGHTS */

.highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 26px 32px;
}

.highlights div {
    text-align: center;
    padding: 15px;
}

.highlights div + div {
    border-left: 1px solid var(--border);
}

.highlights strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 1.7rem;
    color: var(--forest);
}

.highlights span {
    font-size: 0.8rem;
    color: var(--muted);
}


/* ======================================== */
/* COLLECTIONS                              */
/* ======================================== */

.section-intro {
    max-width: 820px;
    margin-bottom: 40px;
}

.section-intro h2,
.calculator-intro h2,
.about-container h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 18px;
}

.section-intro > p:last-child {
    color: var(--muted);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.collection-card {
    background: white;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
    color: var(--text);
}

.collection-card:hover {
    border-color: var(--copper);
}

.collection-card-content {
    padding: 20px;
}

.collection-card strong {
    display: block;
    font-size: 0.95rem;
}

.collection-card small {
    display: block;
    color: var(--muted);
    margin-top: 8px;
}


/* ======================================== */
/* CATALOG SEARCH AND FILTERS               */
/* ======================================== */

.catalog-section {
    background: #EDEFEA;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.search-bar input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px 18px;
    background: white;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
}

.filter-sidebar {
    background: white;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 22px;
    align-self: start;
}

.filter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.filter-heading h3 {
    font-size: 1rem;
}

.filter-group {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 20px;
}

.filter-group h4 {
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-option input {
    accent-color: var(--forest);
}


/* ======================================== */
/* PRODUCT GRID AND LIST                    */
/* ======================================== */

.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

#results-count {
    color: var(--muted);
    font-size: 0.85rem;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.toolbar-actions select,
.view-button {
    border: 1px solid var(--border);
    padding: 9px 12px;
    background: white;
    border-radius: 4px;
    font-size: 0.8rem;
}

.view-button.active {
    background: var(--forest);
    color: white;
}

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

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: box-shadow 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 10px 28px #00000012;
}

.product-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #E6E3DB;
}

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

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

.product-sku {
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 1.1px;
    margin-bottom: 7px;
}

.product-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--forest);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.product-info h3 {
    font-size: 1.1rem;
    line-height: 1.35;
}

.product-subtitle {
    margin: 9px 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.product-availability {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 18px;
}

.product-actions {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.product-actions button {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.78rem;
}

.compare-button {
    border: 1px dashed var(--border);
    border-radius: 4px;
    padding: 9px;
    background: transparent;
    color: var(--forest);
    font-weight: 600;
}

.compare-button.selected {
    background: #E6EDE7;
    border-color: var(--forest);
}


/* LIST VIEW */

.product-grid.list-view {
    grid-template-columns: 1fr;
}

.list-view .product-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.list-view .product-image {
    height: 100%;
    min-height: 220px;
}

.list-view .product-info {
    padding: 22px;
}

.list-view .product-actions {
    display: flex;
    flex-wrap: wrap;
}

.list-view .product-actions button {
    width: auto;
}


/* PAGINATION */

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 30px;
}

.pagination button {
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 13px;
    font-size: 0.8rem;
}

.pagination button[aria-current="page"] {
    background: var(--forest);
    color: white;
}

.empty-state {
    padding: 60px 20px;
    background: white;
    text-align: center;
}

.empty-state p {
    margin: 12px 0 22px;
}


/* ======================================== */
/* PROJECT CALCULATOR                       */
/* ======================================== */

.calculator-section {
    background: var(--forest);
    color: white;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 70px;
}

.calculator-intro .eyebrow {
    color: #DBB99F;
}

.calculator-intro > p:not(.eyebrow) {
    color: #DCE6E0;
    margin-top: 20px;
}

.calculator-form {
    display: grid;
    gap: 12px;
    padding: 30px;
    border-radius: 6px;
    background: white;
    color: var(--text);
}

.calculator-form h3 {
    margin-bottom: 8px;
}

.calculator-form label,
.quote-form label {
    font-weight: 600;
    font-size: 0.85rem;
}

.calculator-form input,
.calculator-form select,
.quote-form input,
.quote-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
}

.calculator-result {
    margin-top: 10px;
    padding: 22px;
    background: #EDF3ED;
    border-radius: 5px;
}

.calculator-result dl {
    margin: 15px 0;
}

.calculator-result dl div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.calculator-result dt {
    font-size: 0.85rem;
}

.calculator-result dd {
    font-weight: 700;
    text-align: right;
}


/* ======================================== */
/* ABOUT                                    */
/* ======================================== */

.about-section {
    text-align: center;
}

.about-container {
    max-width: 800px;
}

.about-container > p:not(.eyebrow) {
    color: var(--muted);
    margin-bottom: 26px;
}


/* ======================================== */
/* COMPARISON BAR                           */
/* ======================================== */

.compare-bar {
    position: fixed;
    z-index: 50;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--slate);
    color: white;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 -5px 20px #00000020;
}

.compare-bar span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.compare-actions {
    display: flex;
    gap: 10px;
}

.compare-bar .primary {
    background: var(--copper);
    color: #18251F;
}

body.has-comparison {
    padding-bottom: 145px;
}


/* ======================================== */
/* MODALS                                   */
/* ======================================== */

dialog {
    position: fixed;
    margin: auto;
    width: min(94%, 850px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border: 0;
    border-radius: 8px;
    color: var(--text);
    background: white;
}

dialog::backdrop {
    background: #00000099;
}

.modal-close {
    display: block;
    margin-left: auto;
    margin-bottom: 12px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 1.8rem;
}

.modal-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.modal-product-layout h2 {
    line-height: 1.3;
    margin-bottom: 12px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin: 20px 0;
}

.spec-table th,
.spec-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 8px;
    text-align: left;
}

.modal-actions {
    display: grid;
    gap: 8px;
}

.compare-modal {
    width: min(96%, 1100px);
}

.comparison-scroll {
    overflow-x: auto;
    margin-top: 25px;
}

.comparison-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 600px;
}

.comparison-table td,
.comparison-table th {
    padding: 15px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 0.85rem;
}

.comparison-table th {
    background: var(--ivory);
}

.comparison-table .product-image {
    margin-bottom: 12px;
    min-width: 120px;
}


/* QUOTE FORM */

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.quote-item input {
    width: 85px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.quote-form {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.quote-confirmation {
    background: #EDF3ED;
    padding: 22px;
    margin-top: 20px;
}

.quote-confirmation ul {
    padding-left: 20px;
    margin: 15px 0;
}


/* NOTIFICATIONS */

.toast {
    position: fixed;
    z-index: 100;
    right: 24px;
    top: 24px;
    max-width: 320px;
    padding: 15px 20px;
    background: var(--forest);
    color: white;
    border-radius: 5px;
    box-shadow: 0 6px 20px #00000025;
    font-size: 0.85rem;
}


/* ======================================== */
/* FOOTER                                   */
/* ======================================== */

.site-footer {
    background: var(--slate);
    color: #CFD8D3;
    padding: 45px 32px 25px;
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-layout h3 {
    color: white;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom {
    border-top: 1px solid #FFFFFF20;
    margin-top: 30px;
    padding-top: 20px;
    font-size: 0.75rem;
}

.footer-bottom a {
    color: #DBB99F;
}


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

@media (max-width: 1100px) {

    .header-container {
        justify-content: center;
    }

    .collection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 800px) {

    .section {
        padding: 60px 20px;
    }

    .hero {
        padding: 85px 20px;
    }

    .demo-banner,
    .navigation {
        justify-content: center;
        text-align: center;
    }

    .catalog-layout,
    .calculator-layout,
    .modal-product-layout {
        grid-template-columns: 1fr;
    }

    .calculator-layout {
        gap: 35px;
    }

    .collection-grid,
    .highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .highlights div + div {
        border-left: none;
    }

    .list-view .product-card {
        grid-template-columns: 160px minmax(0, 1fr);
    }

}

@media (max-width: 480px) {

    .product-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .list-view .product-card {
        display: flex;
    }

    .hero-actions {
        flex-direction: column;
    }

    .calculator-form,
    dialog {
        padding: 20px;
    }

}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }

}
