:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#1c2733;background:#f6f8fa}*{box-sizing:border-box}body{margin:0}header{background:white;border-bottom:1px solid #e1e6ed}nav{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.1rem 0}nav div{display:flex;gap:1.5rem}a{color:#175f9c;text-decoration:none}a:hover{text-decoration:underline}.brand{font-size:1.35rem;font-weight:800;color:#172b40}.container{max-width:1080px;margin:auto;padding:0 1.25rem}main{min-height:75vh;padding-top:2.5rem;padding-bottom:3rem}.hero{padding:4rem 2rem;background:#e7f0f9;border-radius:18px;margin-bottom:3rem}.hero h1{font-size:2.5rem;margin:.2rem 0}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1.3rem}.card,.panel{background:white;border:1px solid #e1e6ed;border-radius:12px;padding:1.3rem}.card img{width:100%;height:190px;object-fit:contain;background:#f5f6f8;border-radius:8px}.card p{color:#54616c;white-space:normal;overflow-wrap:anywhere}.button,button{display:inline-block;background:#1769aa;color:white;border:0;border-radius:7px;padding:.75rem 1.1rem;cursor:pointer;font:inherit}.button:hover{color:white}.secondary{background:#556575}.danger{background:#a42d35;padding:.4rem .65rem}.panel{max-width:650px}.panel label{display:block;font-weight:600;margin:1rem 0}.panel input,.panel textarea{display:block;width:100%;padding:.7rem;border:1px solid #bac5cf;border-radius:6px;margin-top:.4rem;font:inherit}.panel input[type=file]{padding:.5rem}.preview{max-width:180px;max-height:180px}.toolbar{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin-bottom:1rem}.toolbar h1{margin-right:auto}.tablewrap{overflow-x:auto}table{width:100%;border-collapse:collapse;background:white}td,th{padding:1rem;border-bottom:1px solid #e1e6ed;text-align:left}.inline{display:inline;margin-left:1rem}footer{padding:2rem 1.25rem;color:#667}.error{color:#a42d35}

.hint{color:#65717c;font-size:.9rem}.photo-admin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:1rem}.photo-admin-item{border:1px solid #e1e6ed;padding:.5rem;border-radius:8px}.photo-admin-item img{width:100%;height:125px;object-fit:contain}.photo-controls{display:flex;flex-wrap:wrap;gap:.3rem}.photo-controls button{padding:.35rem .55rem;font-size:.85rem}.gallery-thumbs{display:flex;gap:.4rem;overflow-x:auto;margin-top:.5rem}.gallery-thumb{padding:2px;background:white;border:2px solid transparent;border-radius:6px;flex:0 0 54px}.gallery-thumb.selected{border-color:#1769aa}.gallery-thumb img{width:46px;height:46px;object-fit:cover}.product-gallery .gallery-main{width:100%;height:190px;object-fit:contain}

.admin-list-thumb{width:70px;height:70px;object-fit:cover;border-radius:6px;background:#f5f6f8}#newPreviews{margin-top:.75rem}#newPreviews small{overflow-wrap:anywhere}

.admin-description { max-width: 380px; min-width: 180px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }

/* CMS search and pagination */
.admin-search{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem;margin:1rem 0}
.admin-search label{font-weight:600}
.admin-search input{flex:1 1 260px;min-width:0;padding:.7rem;border:1px solid #bac5cf;border-radius:6px;font:inherit}
.admin-search a{padding:.5rem}
.admin-results{color:#54616c;margin:.75rem 0}
.admin-pagination{display:flex;justify-content:flex-start;align-items:center;gap:.45rem;flex-wrap:wrap;margin:1.5rem 0}
.admin-pagination a,.admin-pagination .current{display:inline-block;padding:.45rem .7rem;border:1px solid #cbd5df;border-radius:6px;background:#fff}
.admin-pagination .current{background:#1769aa;color:white;border-color:#1769aa;font-weight:700}
.admin-pagination span:not(.current){margin:0 .5rem;color:#54616c}


/* Responsive layout: storefront and administration */
html{min-width:0;-webkit-text-size-adjust:100%}
body{min-width:0;overflow-wrap:break-word}
img{max-width:100%}
button,input,textarea{max-width:100%}
button,.button{min-height:44px;touch-action:manipulation}
:focus-visible{outline:3px solid #2b75b9;outline-offset:3px}
.site-nav .nav-links{display:flex;align-items:center;gap:1.25rem;flex-wrap:wrap}
.card,.panel{min-width:0}
.card h2,.card h3{overflow-wrap:anywhere}
.card img{display:block}
.gallery-thumb{min-width:54px;min-height:54px}
.gallery-thumb img{display:block}
.admin-tablewrap{width:100%}
.admin-products-table td{vertical-align:top}
.admin-actions{white-space:nowrap}
.admin-actions .inline{margin-left:.5rem}
.admin-pagination a,.admin-pagination .current{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.photo-controls button{min-width:44px;min-height:44px}
@media(max-width:760px){
 .container{padding-left:1rem;padding-right:1rem}
 main{padding-top:1.4rem;padding-bottom:2rem;min-height:65vh}
 .site-nav{flex-wrap:wrap;row-gap:.7rem;padding-top:.85rem;padding-bottom:.85rem}
 .site-nav .brand{width:100%}
 .site-nav .nav-links{width:100%;justify-content:space-between;gap:.5rem}
 .site-nav .nav-links a{padding:.45rem .2rem;min-height:44px;display:inline-flex;align-items:center}
 .hero{padding:2rem 1.25rem;margin-bottom:2rem}
 .hero h1{font-size:clamp(1.75rem,6vw,2.4rem);line-height:1.15}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
 .card{padding:.85rem}
 .card img,.product-gallery .gallery-main{height:165px}
 .card h2,.card h3{font-size:1.12rem}
 .panel{max-width:none;padding:1rem}
 .toolbar{gap:.65rem;align-items:stretch}
 .toolbar h1{width:100%;font-size:1.65rem;margin:0 0 .2rem}
 .toolbar .button,.toolbar form,.toolbar form button{flex:1 1 auto;text-align:center}
 .admin-search{align-items:stretch;gap:.5rem}
 .admin-search label{width:100%}
 .admin-search input{flex-basis:100%;width:100%;min-height:44px}
 .admin-search button{flex:1}
 .admin-results{font-size:.92rem}
 /* Convert the seven-column admin table to readable stacked cards on phones. */
 .admin-tablewrap{overflow:visible}
 .admin-products-table,.admin-products-table tbody,.admin-products-table tr,.admin-products-table td{display:block;width:100%}
 .admin-products-table thead{display:none}
 .admin-products-table{background:transparent}
 .admin-products-table tr{background:white;border:1px solid #dce3ea;border-radius:12px;padding:.75rem;margin-bottom:.85rem;box-shadow:0 1px 3px #1526380a}
 .admin-products-table td{border-bottom:1px solid #edf0f3;padding:.55rem .2rem;display:grid;grid-template-columns:95px minmax(0,1fr);gap:.6rem;align-items:start;white-space:normal;overflow-wrap:anywhere}
 .admin-products-table td:last-child{border-bottom:0}
 .admin-products-table td::before{content:attr(data-label);font-size:.8rem;font-weight:700;color:#586574;padding-top:.15rem}
 .admin-products-table .admin-description{min-width:0;max-width:none}
 .admin-products-table .admin-list-thumb{width:82px;height:82px}
 .admin-products-table .admin-actions{white-space:normal;display:flex;align-items:center;flex-wrap:wrap;gap:.7rem}
 .admin-products-table .admin-actions::before{width:95px;flex:0 0 95px}
 .admin-products-table .admin-actions .inline{margin:0}
 .admin-products-table .admin-actions a{padding:.6rem 0}
 .admin-products-table .admin-actions button{padding:.55rem .9rem}
 .admin-pagination{justify-content:center}
 .photo-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
 .photo-admin-item{min-width:0}
 .photo-admin-item img{height:130px}
 .photo-controls{justify-content:space-between}
 .photo-controls button{flex:1 1 auto}
}
@media(max-width:430px){
 .grid{grid-template-columns:minmax(0,1fr)}
 .card img,.product-gallery .gallery-main{height:230px}
 .hero .button{width:100%;text-align:center}
 .photo-admin-grid{grid-template-columns:minmax(0,1fr)}
 .photo-admin-item img{height:180px}
 .admin-products-table td{grid-template-columns:76px minmax(0,1fr)}
 .admin-products-table .admin-actions::before{width:76px;flex-basis:76px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}

/* Rental checkout and photo lightbox */
.add-cart{display:flex;gap:.6rem;align-items:end;flex-wrap:wrap;margin-top:1rem}.add-cart label{display:grid;gap:.25rem;font-size:.9rem}.add-cart input,.cart-controls input{width:76px;padding:.65rem;border:1px solid #bac5cf;border-radius:6px;font:inherit}.cart-controls,.order-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.order-filters{display:flex;gap:.5rem;flex-wrap:wrap;margin:1rem 0 1.5rem}.order-filters a{padding:.55rem .8rem;background:white;border:1px solid #d3dae2;border-radius:7px}.order-filters .active{background:#1769aa;color:white}.order-list{display:grid;gap:1rem}.order-card h2{margin:0}.order-card ul{padding-left:1.3rem}.order-card p{overflow-wrap:anywhere}
.gallery-open{background:transparent;padding:0;width:100%;height:auto;color:inherit;position:relative;display:block}.gallery-open:hover{background:transparent}.gallery-open span{position:absolute;bottom:8px;right:8px;background:#1b2934d9;color:white;padding:.3rem .55rem;border-radius:5px;font-size:.8rem}.gallery-open .gallery-main{height:190px}.photo-modal[hidden]{display:none!important}.photo-modal{position:fixed;inset:0;z-index:1000;background:#0c1720d9;display:grid;place-items:center;padding:1rem}.modal-open{overflow:hidden}.photo-modal-panel{position:relative;width:75vw;height:75vh;background:#111a22;border-radius:12px;display:flex;flex-direction:column;padding:2.5rem 1rem 1rem;box-shadow:0 20px 70px #0008}.modal-close{position:absolute;top:.2rem;right:.45rem;background:transparent;color:white;font-size:2rem;padding:.15rem .7rem;min-height:40px}.modal-stage{display:flex;flex:1;min-height:0;align-items:center;gap:.5rem}.modal-image{flex:1;min-width:0;width:100%;height:100%;object-fit:contain}.modal-prev,.modal-next{background:#314455;color:white;font-size:2.2rem;padding:.4rem .7rem;flex:0 0 auto}.modal-thumbnails{display:flex;justify-content:center;gap:.5rem;overflow-x:auto;min-height:78px;padding:.65rem}.modal-thumbnails button{padding:2px;background:transparent;border:2px solid transparent;border-radius:5px;flex:0 0 65px}.modal-thumbnails button.selected{border-color:#fff}.modal-thumbnails img{height:58px;width:58px;object-fit:cover;display:block}.modal-stage img{background:transparent}
@media(max-width:760px){.photo-modal{padding:.3rem}.photo-modal-panel{width:96vw;height:90dvh;padding:2.5rem .35rem .5rem}.modal-prev,.modal-next{padding:.3rem;font-size:1.7rem}.modal-thumbnails{justify-content:flex-start}.tablewrap{overflow-x:auto}.cart-controls{min-width:130px}}

/* CMS navigation: desktop sidebar, mobile horizontal section navigation */
.admin-shell-page .admin-shell{display:grid;grid-template-columns:230px minmax(0,1fr);max-width:1500px;margin:0 auto;min-height:calc(100vh - 180px);width:100%;align-items:stretch}
.admin-shell-page .admin-sidebar{background:#172a3a;color:#e7eef5;padding:1.5rem 1rem;min-width:0}
.admin-sidebar-heading{font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:#a7bbc9;margin:.25rem .75rem 1rem}
.admin-sidebar-nav{display:grid;gap:.35rem}
.admin-sidebar-nav a{display:flex;align-items:center;gap:.8rem;color:#e7eef5;padding:.85rem .8rem;border-radius:8px;text-decoration:none;font-weight:600;min-height:44px}
.admin-sidebar-nav a span{font-size:1.3rem;line-height:1}
.admin-sidebar-nav a:hover,.admin-sidebar-nav a:focus-visible{background:#2c4357;color:white}
.admin-sidebar-nav a.is-active{background:#1769aa;color:white}
.admin-sidebar-bottom{margin-top:2rem;padding:.9rem .75rem;border-top:1px solid #415568}
.admin-sidebar-back{color:#d3e4f1;text-decoration:none;font-size:.9rem}
.admin-sidebar-back:hover{text-decoration:underline}
.admin-shell-page .admin-content{padding:1.8rem clamp(1rem,2.5vw,2.5rem);min-width:0;max-width:100%;width:100%;margin:0}
.admin-shell-page .admin-content .admin-tablewrap{overflow-x:auto}
@media(max-width:850px){
 .admin-shell-page .admin-shell{display:block;min-height:0}
 .admin-shell-page .admin-sidebar{padding:.7rem 1rem}
 .admin-sidebar-heading,.admin-sidebar-bottom{display:none}
 .admin-sidebar-nav{display:flex;gap:.6rem;flex-wrap:wrap}
 .admin-sidebar-nav a{padding:.65rem 1rem;flex:1 1 auto;justify-content:center}
 .admin-shell-page .admin-content{padding:1.2rem 1rem}
}

/* Admin logout integrated into main header navigation */
.nav-logout{display:inline-flex;margin:0;align-items:center}
.nav-logout-button{background:transparent;color:inherit;border:0;border-radius:5px;padding:.45rem .2rem;font:inherit;font-weight:inherit;cursor:pointer;min-height:44px}
.nav-logout-button:hover{text-decoration:underline;background:transparent}
@media(max-width:760px){.nav-logout-button{padding:.45rem .2rem}}

/* Add-to-cart confirmation modal */
.cart-modal[hidden]{display:none!important}.cart-modal{position:fixed;inset:0;z-index:1100;background:#0c1720b8;display:grid;place-items:center;padding:1rem}.cart-modal-panel{position:relative;width:min(560px,100%);max-height:90dvh;overflow:auto;background:#fff;color:#182735;border-radius:14px;padding:1.75rem;box-shadow:0 20px 70px #0005}.cart-modal-close{position:absolute;top:.35rem;right:.6rem;background:transparent;color:#243443;font-size:1.8rem;padding:.1rem .55rem}.cart-modal-body h2{margin:.2rem 2rem 1rem 0}.cart-modal-items{display:grid;gap:0;max-height:42dvh;overflow:auto}.cart-modal-item{display:flex;justify-content:space-between;gap:1rem;align-items:start;padding:.8rem 0;border-bottom:1px solid #e3e9ed}.cart-modal-muted{color:#596a78;font-size:.9rem;margin:.4rem 0}.cart-modal-total{display:flex;justify-content:space-between;gap:1rem;padding:1rem 0}.cart-modal-actions{display:flex;gap:.75rem;flex-wrap:wrap;align-items:center;margin:.5rem 0}.cart-modal-actions>*{flex:1 1 170px;text-align:center}.cart-modal-actions .secondary{background:#e9eff3;color:#172a3a}.cart-modal-actions .button{display:inline-flex;align-items:center;justify-content:center}
@media(max-width:480px){.cart-modal-panel{padding:1.25rem}.cart-modal-actions{flex-direction:column;align-items:stretch}.cart-modal-actions>*{width:100%}}

/* Product attributes */
.product-attributes{display:flex;flex-wrap:wrap;gap:.35rem 1rem;margin:.65rem 0}.product-attributes span{display:inline-block}

/* Sortable admin product headings */
.admin-products-table .admin-sort-link{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:.25rem;white-space:nowrap}
.admin-products-table .admin-sort-link:hover,.admin-products-table .admin-sort-link:focus-visible{text-decoration:underline}
