/* =========================================================
   Steinmetz Tablecloths — Responsive UI
   Refined version of the original brand (lavender / purple /
   gold / brown). Mobile-first, modernized in place.
   ========================================================= */

:root {
    --lavender:       #c5c6e2;
    --lavender-soft:  #edeef8;
    --purple:         #8588d3;
    --purple-bar:     #6f72c4;  /* darker shade for white text on bars */
    --purple-dark:    #51549c;
    --gold:           #c9a84c;
    --gold-dark:      #a8862f;
    --brown:          #846432;
    --brown-dark:     #5e4624;
    --ink:            #3f3f3f;
    --body:           #5a5a5a;
    --muted:          #8a8a8a;
    --line:           #e3e3ee;
    --bg:             #ffffff;
    --soft:           #f7f7fb;
    --radius:         10px;
    --radius-sm:      6px;
    --shadow:         0 2px 10px rgba(40, 40, 80, .08);
    --shadow-lg:      0 8px 30px rgba(40, 40, 80, .14);
    --maxw:           1200px;
    --transition:     .2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Segoe UI", Calibri, Arial, Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--body);
    background: var(--bg);
}

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }

a { color: var(--brown); transition: color var(--transition); }
a:hover { color: var(--brown-dark); }

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 600;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }

/* ---------- Buttons ---------- */
.btn,
button,
input[type="submit"] {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 0;
    border-radius: var(--radius-sm);
    padding: .55em 1.1em;
    background: var(--brown);
    color: #fff;
    transition: background var(--transition), transform var(--transition);
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover,
button:hover,
input[type="submit"]:hover { background: var(--brown-dark); color: #fff; }

.btn-gold { background: var(--gold); color: #2c2310; }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }

/* ---------- Form fields ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .5em .65em;
    max-width: 100%;
}
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--lavender);
    outline-offset: 0;
    border-color: var(--purple);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--lavender);
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 0 1 auto;
    min-width: 0;
}
.brand img { max-height: 54px; width: auto; }

.header-contact {
    text-align: right;
    font-size: .82rem;
    line-height: 1.45;
    color: var(--brown-dark);
}
.header-contact .phone {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brown-dark);
    text-decoration: none;
    line-height: 1.1;
}
.header-contact .phone:hover { color: var(--purple-dark); }
.header-contact .hours { font-weight: 700; color: var(--brown); }
.header-contact a.email { color: var(--brown-dark); }

/* hamburger */
.nav-toggle {
    display: none;
    background: transparent;
    color: var(--brown-dark);
    font-size: 1.6rem;
    padding: .25em .5em;
    line-height: 1;
}
.nav-toggle:hover { background: rgba(255,255,255,.4); color: var(--brown-dark); }

/* ---------- Primary nav bar ---------- */
.primary-nav {
    background: var(--purple-bar);
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
}
.primary-nav .nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 18px;
}
.primary-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}
.primary-nav li a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 16px;
    transition: background var(--transition);
}
.primary-nav li a:hover { background: var(--purple-dark); color: #fff; }
.primary-nav li a.active {
    background: var(--purple-dark);
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--gold);
}

.search-form {
    display: flex;
    gap: 6px;
    padding: 8px 0;
    align-items: center;
}
.search-form input[type="text"] { width: 180px; }
.search-form input[type="submit"] { background: var(--brown); }
.search-form input[type="submit"]:hover { background: var(--brown-dark); }

/* =========================================================
   FILTER BAR ("Search by")
   ========================================================= */
.filter-bar {
    background: var(--lavender-soft);
    border-bottom: 1px solid var(--line);
}
.filter-bar .filter-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: .9rem;
}
.filter-bar form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    width: 100%;
}
.filter-bar b { color: var(--brown-dark); }
.filter-bar select { min-width: 130px; flex: 0 1 auto; font-size: .9rem; }
.filter-bar a { font-weight: 700; color: var(--brown); white-space: nowrap; }

/* =========================================================
   LAYOUT: sidebar + content
   ========================================================= */
.layout {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    gap: 28px;
    padding: 26px 18px 40px;
    align-items: flex-start;
}

.sidebar {
    flex: 0 0 220px;
    position: sticky;
    top: 96px;
}

.content {
    flex: 1 1 auto;
    min-width: 0;
}

/* category card in sidebar */
.cat-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #fff;
}
.cat-card .cat-head {
    background: var(--purple-bar);
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 10px;
    font-family: Georgia, serif;
}
.cat-card ul { list-style: none; margin: 0; padding: 0; }
.cat-card li { border-top: 1px solid var(--line); }
.cat-card li:first-child { border-top: 0; }
.cat-card li a {
    display: block;
    padding: 10px 14px;
    color: var(--brown);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: background var(--transition), color var(--transition);
}
.cat-card li a:hover { background: var(--lavender-soft); color: var(--brown-dark); }

/* =========================================================
   HOME PAGE
   ========================================================= */
.home-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    margin-bottom: 26px;
}
.home-intro { flex: 1 1 260px; }
.home-intro .lead {
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--ink);
}
.home-slideshow {
    flex: 1 1 460px;
    max-width: 520px;
    margin: 0 auto;
}
.home-slideshow #slidedom {
    max-width: 100% !important;
    height: auto !important;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--soft) !important;
}
.home-slideshow #slidedom img { width: 100%; height: auto; display: block; }

/* =========================================================
   PRODUCT GRID (list_of_products)
   ========================================================= */
.box_container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.box_container > div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-align: center;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.box_container > div:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.box_container a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    padding: 14px;
    gap: 10px;
}
.box_container a span { order: 2; font-size: .95rem; }
.box_container a img {
    order: 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* =========================================================
   PRODUCT DETAIL
   ========================================================= */
.product {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 10px;
}
.product-media { flex: 1 1 340px; max-width: 460px; }
.product-info  { flex: 1 1 300px; }

/* NOTE: no overflow:hidden here — jqzoom appends its .zoomWindow at
   left:110% (outside this box); clipping it would hide the zoom. */
.product-media .main-image {
    display: inline-block;   /* contains the plugin's float:left .zoomPad */
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    line-height: 0;
}
.product-media .main-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}
.enlarge-bar {
    background: var(--lavender);
    border-radius: var(--radius-sm);
    margin-top: 8px;
    padding: 6px 10px;
    font-size: .85rem;
}
.enlarge-bar a { color: var(--brown-dark); text-decoration: none; font-weight: 600; }

.thumbs-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.thumbs-row a {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
}
.thumbs-row img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

.hint { font-size: .82rem; color: var(--muted); }

/* size / price table */
.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
}
.size-table th,
.size-table td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
}
.size-table th {
    color: var(--brown-dark);
    font-family: inherit;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.size-table tr:nth-child(even) td { background: var(--soft); }

.colors-list { color: var(--ink); }

/* legacy size/price cells (print page etc.) */
.tbl_sizes { padding: 5px 0 5px 5px; }
.tbl_prices { padding: 5px 0 5px 30px; }
td.tbl_sizes, td.tbl_prices { border-top: solid 1px #b4b4b4; }

/* =========================================================
   BREADCRUMBS / MISC CONTENT
   ========================================================= */
.breadcrumbs {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 14px;
}
.breadcrumbs a, a.navi2 { color: var(--muted); }
.breadcrumbs a:hover, a.navi2:hover { color: var(--brown); }

.mission, p.mission { line-height: 1.55; }
.about, p.about { line-height: 1.6; }
span.st { font-variant: small-caps; font-weight: 600; color: var(--brown-dark); }

.success { color: #1c7c34; font-size: .95rem; }
.fail { color: #c60000; font-size: .95rem; }

/* how-to-order list */
.howto ul { padding-left: 1.2em; }
.howto > ul > li { line-height: 1.9; }
.howto ul li ul { margin: 4px 0 10px; }
.howto ul li ul li { line-height: 1.4; list-style: none; }
.store-hours {
    border: 2px solid var(--brown-dark);
    color: #fff;
    background: var(--brown-dark);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    max-width: 240px;
    margin: 16px 0;
    text-align: center;
}
.map-embed {
    width: 100%;
    max-width: 650px;
    aspect-ratio: 65 / 35;
    border: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

/* scroll-catalog callout */
.scroll_catalog_link,
.scroll-callout {
    border: 1px solid var(--line);
    background: var(--lavender-soft);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.scroll-callout .tag {
    color: #fff;
    background: var(--gold);
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 2px 10px;
    font-size: .9rem;
}

/* admin overlay (kept for admins viewing front-end) */
#admin_box {
    position: fixed;
    width: 100%;
    top: 0; left: 0;
    z-index: 100;
    background: rgba(0,0,0,.75);
    color: #fff;
    padding: 10px 16px;
    font-size: .9rem;
}
#admin_box a { color: #fff; text-decoration: underline; }

/* =========================================================
   PAGINATION
   ========================================================= */
#pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 24px 0;
}
#pagination a,
#pagination span {
    display: inline-block;
    min-width: 38px;
    text-align: center;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--brown);
    font-weight: 600;
}
#pagination a:hover { background: var(--lavender-soft); }
#pagination span.selected {
    background: var(--purple-bar);
    color: #fff;
    border-color: var(--purple-bar);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: var(--lavender);
    color: var(--brown-dark);
    margin-top: 40px;
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    padding: 24px 18px;
    font-size: .9rem;
}
.footer-inner .col { flex: 1 1 200px; }
.site-footer h4 {
    color: var(--brown-dark);
    font-size: 1rem;
    margin-bottom: .5em;
}
.site-footer a { color: var(--brown-dark); }
.footer-bottom {
    border-top: 1px solid rgba(94,70,36,.2);
    text-align: center;
    padding: 12px;
    font-size: .82rem;
    color: var(--brown);
}
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 4px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar {
        flex: 1 1 auto;
        width: 100%;
        position: static;
    }
    .cat-card ul {
        display: flex;
        flex-wrap: wrap;
    }
    .cat-card li { border-top: 0; flex: 1 1 auto; }
    .cat-card li a {
        text-align: center;
        border: 1px solid var(--line);
        margin: -1px 0 0 -1px;
    }
}

@media (max-width: 760px) {
    h1 { font-size: 1.55rem; }

    .header-inner { flex-wrap: wrap; padding: 10px 14px; }
    .nav-toggle { display: inline-block; order: 3; }
    .brand { order: 1; flex: 1 1 auto; }
    .brand img { max-height: 42px; }
    .header-contact {
        order: 4;
        flex-basis: 100%;
        text-align: left;
        margin-top: 4px;
    }
    .header-contact .phone { font-size: 1.25rem; }

    /* collapsible nav */
    .primary-nav { display: none; }
    .primary-nav.open { display: block; }
    .primary-nav .nav-inner { flex-direction: column; align-items: stretch; padding: 0; }
    .primary-nav ul { flex-direction: column; }
    .primary-nav li { border-top: 1px solid var(--purple-dark); }
    .primary-nav li a { padding: 14px 18px; }
    .search-form { padding: 12px 18px; }
    .search-form input[type="text"] { flex: 1 1 auto; width: auto; }

    .filter-bar select { flex: 1 1 45%; min-width: 0; }
    .filter-bar a { flex: 1 1 100%; }

    .footer-inner { flex-direction: column; gap: 18px; }
}

@media (max-width: 420px) {
    .box_container { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
    .site-header, .primary-nav, .filter-bar, .sidebar,
    .site-footer, .nav-toggle, .scroll_catalog_link,
    .scroll-callout, #admin_box { display: none !important; }
    .layout { display: block; padding: 0; }
    body { color: #000; }
}
