
:root{
--sage: #aece9f;
--teal: #72a7ab;
--paper: #f8f6f1;
--ink: #29352b;
--ink-soft: #54614f;
--card: #fffdf9;
--sage-deep: #8fb87f;
--teal-deep: #588488;
--line: rgba(41, 53, 43, 0.14);
--shadow: 0 1px 2px rgba(41,53,43,0.06), 0 8px 24px -8px rgba(41,53,43,0.12);
}

*{ margin:0; padding:0; box-sizing:border-box; }

body{
background: var(--paper);
background-image:
    radial-gradient(circle at 1px 1px, rgba(41,53,43,0.05) 1px, transparent 0);
background-size: 22px 22px;
color: var(--ink);
font-family: 'Outfit', sans-serif;
min-height: 100vh;
padding-bottom: 80px;
}

.display{
font-family: 'Fraunces', serif;
}

/* ---------- Shop header ---------- */
.shop-header{
max-width: 1180px;
margin: 0 auto;
padding: 64px 32px 36px;
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 24px;
border-bottom: 1px solid var(--line);
}

.shop-header .eyebrow{
font-size: 13px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--teal-deep);
font-weight: 600;
margin-bottom: 10px;
display: block;
}

.shop-header h1{
font-size: clamp(36px, 5vw, 54px);
font-weight: 500;
font-style: italic;
line-height: 1.05;
color: var(--ink);
}

.shop-header .sub{
max-width: 320px;
font-size: 15px;
color: var(--ink-soft);
line-height: 1.55;
text-align: right;
}

.header-right{
display: flex;
align-items: flex-end;
gap: 18px;
}

.cart-link{
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 42px;
height: 42px;
border-radius: 50%;
border: 1px solid var(--line);
background: var(--card);
color: var(--ink);
text-decoration: none;
flex-shrink: 0;
transition: border-color 0.18s ease, background 0.18s ease;
}

.cart-link:hover{
border-color: var(--teal);
background: rgba(114,167,171,0.1);
}

.cart-link svg{
width: 19px;
height: 19px;
}

.cart-count{
position: absolute;
top: -6px;
right: -6px;
min-width: 19px;
height: 19px;
padding: 0 4px;
border-radius: 100px;
background: var(--teal-deep);
color: var(--paper);
font-size: 11px;
font-weight: 600;
font-family: 'Outfit', sans-serif;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
}

.filter-row{
max-width: 1180px;
margin: 0 auto;
padding: 28px 32px 8px;
display: flex;
gap: 10px;
flex-wrap: wrap;
}

.filter-chip{
font-family: 'Outfit', sans-serif;
font-size: 13.5px;
font-weight: 500;
padding: 8px 18px;
border-radius: 100px;
border: 1px solid var(--line);
background: var(--card);
color: var(--ink-soft);
cursor: pointer;
transition: all 0.18s ease;
}

.filter-chip:hover{
border-color: var(--teal);
color: var(--ink);
}

.filter-chip.active{
background: var(--ink);
border-color: var(--ink);
color: var(--paper);
}

/* ---------- Gallery grid ---------- */
.gallery{
max-width: 1180px;
margin: 0 auto;
padding: 28px 32px 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 28px;
align-items: start;
}

@media (max-width: 920px){
.gallery{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
.gallery{ grid-template-columns: 1fr; }
.shop-header{
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding-top: 48px;
}
.shop-header .sub{ display: none; }
.header-right{
  position: absolute;
  top: 20px;
  right: 32px;
  gap: 0;
}
}

.card{
background: var(--card);
border: 1px solid var(--line);
border-radius: 4px;
padding: 18px;
cursor: pointer;
position: relative;
transition: transform 0.22s ease, box-shadow 0.22s ease;
display: flex;
flex-direction: column;
}

.card:hover{
transform: translateY(-5px);
box-shadow: var(--shadow);
}

.card:hover .art-frame img,
.card:hover .art-frame svg{
transform: scale(1.035);
}

.art-frame{
overflow: hidden;
border-radius: 2px;
background: var(--sage);
margin-bottom: 14px;
position: relative;
line-height: 0;
}

.art-frame svg{
width: 100%;
height: auto;
display: block;
transition: transform 0.4s ease;
}

.art-frame img{
width: 100%;
height: auto;
display: block;
transition: transform 0.4s ease;
}

.sold-banner{
position: absolute;
top: 14px;
left: -6px;
background: var(--ink);
color: var(--paper);
font-size: 13px;
letter-spacing: 0.08em;
text-transform: uppercase;
font-weight: 600;
padding: 7px 16px 7px 18px;
border-radius: 0 4px 4px 0;
}
.sold-banner::after{
content:'';
position: absolute;
left: 0;
bottom: -8px;
border-width: 8px 6px 0 0;
border-style: solid;
border-color: #1a221c transparent transparent transparent;
}

.sold-banner.available{
background: var(--teal-deep);
}
.sold-banner.available::after{
border-color: #3d5f61 transparent transparent transparent;
}

.card-info{
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 10px;
}

.card-title{
font-family: 'Fraunces', serif;
font-weight: 500;
font-size: 18px;
line-height: 1.25;
margin-bottom: 4px;
}

.card-medium{
font-size: 12.5px;
color: var(--ink-soft);
}

.price-tag{
flex-shrink: 0;
font-family: 'Outfit', sans-serif;
font-weight: 600;
font-size: 14.5px;
color: var(--teal-deep);
background: rgba(114,167,171,0.13);
padding: 5px 10px;
border-radius: 3px;
white-space: nowrap;
position: relative;
}
.price-tag::before{
content:'';
position: absolute;
left: -4px;
top: 50%;
width: 7px;
height: 7px;
background: var(--card);
border: 1px solid var(--teal-deep);
border-radius: 50%;
transform: translateY(-50%);
}

/* ---------- Modal ---------- */
.modal-overlay{
position: fixed;
inset: 0;
background: rgba(41, 53, 43, 0.45);
backdrop-filter: blur(3px);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
padding: 24px;
}

.modal-overlay.open{
opacity: 1;
pointer-events: all;
}

.modal{
background: var(--card);
border-radius: 6px;
width: 100%;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 20px 60px -10px rgba(41,53,43,0.35);
transform: translateY(16px) scale(0.98);
transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
position: relative;
}

.modal-overlay.open .modal{
transform: translateY(0) scale(1);
}

/* Portrait artwork: side-by-side, image left, controls right. */
.modal--portrait{
display: grid;
grid-template-columns: 1.15fr 1fr;
max-width: 920px;
}

/* Landscape artwork: same side-by-side layout but much wider modal so the
   horizontal image has room to breathe. Controls stay in a fixed-width
   right panel so the image column gets as much space as possible. */
.modal--landscape{
display: grid;
grid-template-columns: 1fr 300px;
max-width: 1160px;
}

@media (max-width: 780px){
.modal--portrait{ grid-template-columns: 1fr; }
.modal--landscape{ grid-template-columns: 1fr; }
}

.modal-art{
background: var(--sage);
padding: 28px;
display: flex;
align-items: center;
justify-content: center;
}

.modal--landscape .modal-art{
padding: 28px;
}

.modal--landscape .modal-art img{
width: 100%;
height: auto;
max-height: 80vh;
object-fit: contain;
}

.modal-art svg{
width: 100%;
height: auto;
border-radius: 2px;
}

.modal-art img{
width: 100%;
height: auto;
border-radius: 2px;
display: block;
box-shadow: 0 4px 20px rgba(41,53,43,0.15);
}

.modal-body{
padding: 36px 32px;
display: flex;
flex-direction: column;
}

.modal--landscape .modal-body{
padding: 36px 32px;
}

.modal-close{
position: absolute;
top: 14px;
right: 14px;
width: 32px;
height: 32px;
border-radius: 50%;
border: none;
background: rgba(255,255,255,0.85);
color: var(--ink);
font-size: 18px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
z-index: 5;
transition: background 0.15s ease;
}
.modal-close:hover{ background: #fff; }

.modal-eyebrow{
font-size: 12px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--teal-deep);
font-weight: 600;
margin-bottom: 8px;
}

.modal-title{
font-family: 'Fraunces', serif;
font-style: italic;
font-weight: 500;
font-size: 30px;
line-height: 1.15;
margin-bottom: 10px;
}

.modal-desc{
font-size: 14px;
color: var(--ink-soft);
line-height: 1.6;
margin-bottom: 22px;
}

.option-group{
margin-bottom: 20px;
}

.option-label{
font-size: 12.5px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--ink);
margin-bottom: 10px;
display: block;
}

.size-options{
display: flex;
gap: 8px;
flex-wrap: wrap;
}

.size-btn{
font-family: 'Outfit', sans-serif;
border: 1.5px solid var(--line);
background: transparent;
border-radius: 5px;
padding: 10px 14px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
color: var(--ink);
transition: all 0.15s ease;
text-align: left;
line-height: 1.3;
}

.size-btn .dim{
display: block;
font-size: 11px;
color: var(--ink-soft);
font-weight: 400;
margin-top: 1px;
}

.size-btn:hover{
border-color: var(--teal);
}

.size-btn.selected{
border-color: var(--teal-deep);
background: rgba(114,167,171,0.12);
}

.qty-row{
display: flex;
align-items: center;
gap: 14px;
}

.qty-control{
display: flex;
align-items: center;
border: 1.5px solid var(--line);
border-radius: 5px;
overflow: hidden;
}

.qty-control button{
width: 36px;
height: 38px;
border: none;
background: var(--paper);
font-size: 16px;
cursor: pointer;
color: var(--ink);
transition: background 0.15s ease;
}

.qty-control button:hover{ background: var(--sage); }

.qty-control button:disabled{
cursor: not-allowed;
color: var(--ink-soft);
opacity: 0.45;
background: var(--paper);
}

.qty-control button:disabled:hover{ background: var(--paper); }

.qty-control span{
width: 40px;
text-align: center;
font-weight: 500;
font-size: 14.5px;
}

.stock-note{
font-size: 12.5px;
color: var(--ink-soft);
}

.modal-footer{
margin-top: auto;
padding-top: 22px;
border-top: 1px solid var(--line);
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}

.total-price{
font-family: 'Fraunces', serif;
font-size: 24px;
font-weight: 600;
}

.total-price span{
display: block;
font-family: 'Outfit', sans-serif;
font-size: 11.5px;
color: var(--ink-soft);
font-weight: 400;
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 2px;
}

.add-btn{
font-family: 'Outfit', sans-serif;
background: var(--ink);
color: var(--paper);
border: none;
padding: 13px 26px;
border-radius: 5px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: background 0.18s ease, transform 0.15s ease;
flex-shrink: 0;
}

.add-btn:hover{
background: var(--teal-deep);
}

.add-btn:active{
transform: scale(0.97);
}

.add-btn.sold-out{
background: var(--line);
color: var(--ink-soft);
cursor: not-allowed;
}

.added-flash{
font-size: 12.5px;
color: var(--teal-deep);
font-weight: 600;
opacity: 0;
transition: opacity 0.2s ease;
margin-top: 8px;
text-align: center;
}
.added-flash.show{ opacity: 1; }
