:root{
  --bg:#fff; --fg:#0a0a0a; --muted:#6b7280; --line:#e5e7eb; --accent:#3b3df5;
  color-scheme: only light;
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-padding-top:90px;}
body{font-family:Arial,Helvetica,sans-serif; color:#0a0a0a; background:#fff; -webkit-font-smoothing:antialiased;}
img{display:block; max-width:100%;}
button{font:inherit; cursor:pointer;}
.hidden{display:none !important;}
.muted{color:var(--muted);}

/* Header */
.header{position:fixed; inset:0 0 auto 0; height:90px; z-index:40; display:flex; flex-direction:column; align-items:center; justify-content:center; background:#fff; border-bottom:1px solid var(--line); padding:6px 0;}
.header-top{display:flex; justify-content:space-between; align-items:center; width:100%; padding:0 24px; height:44px;}
.header-bottom{display:flex; justify-content:center; align-items:center; width:100%; height:32px; background:#fff;}

/* Logo — fixed above the nav row, perfectly centered */
.header-logo{position:fixed; left:50%; top:28px; transform:translate(-50%, -50%); display:flex; align-items:center; justify-content:center; z-index:42;}
.header-logo img{height:32px; width:auto;}
.header-logo .wordmark{font-family:Georgia,serif; font-style:italic; font-weight:700; font-size:22px; letter-spacing:2px; color:#0a0a0a;}

.search-container{display:flex; align-items:center; gap:4px; border:1px solid var(--line); background:var(--bg); padding:5px 10px; width:170px; height:34px;}
.search-container:focus-within{border-color:var(--fg);}
.search-icon{font-size:13px; color:var(--muted); flex:none; line-height:1;}
.search-container input{border:none; background:none; font-size:11px; letter-spacing:.08em; outline:none; width:100%; color:var(--fg); min-width:0;}
.search-container input::placeholder{color:var(--muted);}
.search-container button{background:none; border:none; color:var(--muted); font-size:13px; cursor:pointer; padding:0 2px; display:flex; align-items:center; flex:none;}
.search-container button:hover{color:var(--fg);}

.nav{display:flex; flex-wrap:wrap; gap:18px; justify-content:center; font-size:11px; letter-spacing:.15em; text-transform:uppercase;}
.nav a{color:#0a0a0a; text-decoration:none; font-weight:500; opacity:0.8;}
.nav a:hover,.nav a.active{color:#0a0a0a; opacity:1;}
.cart-btn{position:relative; right:0; top:0; z-index:41; background:none; border:none; font-size:11px; letter-spacing:.15em; text-transform:uppercase; color:var(--fg); display:flex; align-items:center;}
.cart-btn .count{display:none; min-width:16px; padding:0 5px; margin-left:5px; border-radius:999px; background:var(--accent); color:#fff; font-size:10px; line-height:16px;}

/* Layout Offset */
main{padding-top:90px;}

/* Hero */
.hero{min-height:auto; display:flex; flex-direction:column; scroll-snap-align:start;}
.hero-img{width:100%; max-height:50vh; overflow:hidden; display:flex; align-items:center; justify-content:center; background:#0a0a0a;}
.hero-img img{width:100%; height:100%; display:block; object-fit:contain;}
.hero-img.placeholder{min-height:300px; background:linear-gradient(135deg,#141414,#3a3a3a);}

.hero-slogan{
  text-align:center;
  font-family:Georgia,serif;
  font-style:italic;
  font-size:16px;
  letter-spacing:1px;
  color:var(--fg);
  padding:28px 20px;
  border-bottom:1px solid var(--line);
  background:var(--bg);
}

/* Feed / slide */
.slide{min-height:calc(100vh - 90px); display:flex; flex-direction:column; align-items:center; justify-content:center; padding:40px 20px;}
.detail-container .slide{min-height:auto; padding:40px 20px;}
.carousel{position:relative; width:100%; max-width:400px; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; background:#fafafa; overflow:hidden; border:1px solid var(--line);}
.slide-img{width:100%; height:100%; object-fit:contain;}
div.slide-img.placeholder{display:flex; align-items:center; justify-content:center; color:#cfcfcf; font-size:11px; letter-spacing:.18em; text-transform:uppercase;}
.carousel .nav{position:absolute; top:50%; transform:translateY(-50%); background:none; border:none; font-size:30px; color:#9ca3af; padding:0 10px;}
.carousel .nav:hover{color:var(--fg);}
.carousel .prev{left:0;} .carousel .next{right:0;}
.dots{display:flex; gap:7px; justify-content:center; margin-top:14px;}
.dot{width:6px; height:6px; border-radius:999px; background:#d1d5db; border:none; padding:0;}
.dot.active{background:var(--fg);}
.meta{margin-top:26px; width:100%; max-width:420px; text-align:center;}
.closed-view{display:flex; flex-direction:column; align-items:center; gap:10px;}
.p-name{font-size:12px; letter-spacing:.16em; text-transform:uppercase; font-weight:600;}
.p-price{font-size:12px; color:var(--muted);}
.plus{width:34px; height:34px; border-radius:999px; border:1px solid var(--line); background:none; font-size:18px; line-height:1; color:var(--fg);}
.plus:hover{border-color:var(--fg);}
.plus:disabled{opacity:.4; cursor:not-allowed;}
.size-head{display:flex; align-items:center; justify-content:space-between; font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted);}
.size-head .q,.size-head .x{background:none; border:none; color:var(--muted); font-size:13px;}
.size-head span{color:var(--fg);}
.sizes{display:flex; flex-wrap:wrap; gap:18px 26px; justify-content:center; margin:18px 0;}
.size{background:none; border:none; font-size:15px; color:var(--muted);}
.size:hover{color:var(--fg);}
.info-btn{background:none; border:none; font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted);}
.info-btn:hover{color:var(--fg);}
.info{margin-top:16px; font-size:13px; line-height:1.6; color:var(--muted); text-align:left; max-width:340px; margin-left:auto; margin-right:auto;}
.info strong{font-weight:600; color:var(--fg);}
.empty{min-height:60vh; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:12px; letter-spacing:.16em; text-transform:uppercase;}

/* Recommended Products Carousel */
.other-products-section{width:100%; max-width:800px; margin:40px auto 60px; padding:0 20px;}
.other-products-section h3{font-size:11px; letter-spacing:.15em; text-transform:uppercase; margin-bottom:20px; color:var(--fg); text-align:center;}
.horizontal-scroll{display:flex; gap:20px; overflow-x:auto; padding-bottom:16px; scroll-behavior:smooth; -webkit-overflow-scrolling:touch;}
.horizontal-scroll::-webkit-scrollbar{display:none;}
.horizontal-scroll{-ms-overflow-style:none; scrollbar-width:none;}
.horizontal-card{flex:0 0 140px; cursor:pointer; display:flex; flex-direction:column; align-items:center; text-align:center;}
.horizontal-card img{width:140px; height:140px; object-fit:contain; background:#fafafa; border:1px solid var(--line); margin-bottom:8px; transition:transform .2s ease;}
.horizontal-card:hover img{transform:scale(1.05);}
.horizontal-card-name{font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--fg); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%;}
.horizontal-card-price{font-size:10px; color:var(--muted); margin-top:3px;}
.horizontal-placeholder{width:140px; height:140px; display:flex; align-items:center; justify-content:center; color:#bbb; font-size:9px; letter-spacing:.12em; text-transform:uppercase; border:1px solid var(--line); background:#fafafa;}

/* Product Grid */
.grid{display:grid; grid-template-columns:repeat(6, 1fr); gap:0; padding:20px 0 30px; border-top:1px solid var(--line);}
.grid-card{position:relative; cursor:pointer; background:#fff; display:flex; flex-direction:column; align-items:center; padding:30px 16px 16px; border-bottom:1px solid var(--line);}
.grid-card .grid-img-wrap{width:100%; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center; margin-bottom:14px;}
.grid-card img{max-width:100%; max-height:100%; object-fit:contain; transition:transform .3s ease;}
.grid-card:hover img{transform:scale(1.06);}
.grid-card .grid-name{font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--fg); text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;}
.grid-card .grid-price{font-size:10px; color:var(--muted); margin-top:3px; text-align:center;}
.grid-card .sold-badge{
  position:absolute; top:8px; right:8px;
  background:rgba(0,0,0,.6); color:#fff;
  font-size:9px; letter-spacing:.12em; text-transform:uppercase;
  padding:3px 8px; border-radius:2px;
}
.grid-card .grid-placeholder{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  color:#bbb; font-size:10px; letter-spacing:.16em; text-transform:uppercase;
}

/* Pagination */
.pagination{
  display:flex; align-items:center; justify-content:center;
  gap:8px; padding:20px 0 40px;
}
.pagination button{
  min-width:36px; height:36px;
  border:1px solid var(--line); background:none;
  font-size:12px; color:var(--muted);
  transition:all .15s;
}
.pagination button:hover{border-color:var(--fg); color:var(--fg);}
.pagination button.active{background:var(--fg); color:#fff; border-color:var(--fg);}
.pagination button:disabled{opacity:.3; cursor:default;}

/* Back button (detail view) */
.back-bar{
  position:sticky; top:90px; z-index:30;
  background:rgba(255,255,255,.92); backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
  padding:10px 20px;
  display:flex; align-items:center;
}
.back-bar button{
  background:none; border:none;
  font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); display:flex; align-items:center; gap:6px;
}
.back-bar button:hover{color:var(--fg);}
.back-bar .arrow{font-size:16px;}

/* Detail mode scroll-snap */
.detail-feed .slide{scroll-snap-align:start;}
.detail-feed{scroll-snap-type:y mandatory;}

@media(max-width:1200px){ .grid{grid-template-columns:repeat(4, 1fr);} }
@media(max-width:768px){ .grid{grid-template-columns:repeat(3, 1fr);} }
@media(max-width:600px){ .grid{grid-template-columns:1fr;} }
/* Ensure vertical single column on portrait phones */
@media(max-width:600px) and (orientation: portrait){ .grid{grid-template-columns:1fr;} .grid-card{padding:20px;}}
@media(max-width:480px){ .grid{grid-template-columns:repeat(2, 1fr);} }

/* Cart */
.overlay{position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:50; display:none;}
.overlay.open{display:block;}
.drawer{position:fixed; top:0; right:0; height:100%; width:380px; max-width:90%; background:#fff; z-index:51; transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column; padding:20px;}
.drawer.open{transform:translateX(0);}
.drawer h2{font-size:12px; letter-spacing:.16em; text-transform:uppercase; margin-bottom:16px; display:flex; justify-content:space-between; align-items:center;}
.drawer h2 button{background:none; border:none; font-size:16px;}
.cart-items{flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:14px;}
.cart-item{display:flex; gap:10px; align-items:flex-start;}
.ci-img{width:60px; height:60px; background:#f3f4f6; overflow:hidden; flex:none;}
.ci-img img{width:100%; height:100%; object-fit:cover;}
.ci-info{flex:1; font-size:12px;}
.ci-info .muted{font-size:11px; margin:2px 0 6px;}
.qty{display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted);}
.qty button{width:20px; height:20px; border:1px solid var(--line); background:none;}
.qty .rm{width:auto; border:none; text-decoration:underline; margin-left:6px;}
.ci-price{font-size:12px;}
.cart-foot{border-top:1px solid var(--line); padding-top:14px; margin-top:14px;}
.cart-foot .row{display:flex; justify-content:space-between; font-size:13px; margin-bottom:12px;}
.checkout{width:100%; height:46px; background:var(--fg); color:#fff; border:none; font-size:11px; letter-spacing:.16em; text-transform:uppercase;}
.checkout:hover{background:var(--accent);}

/* Toast */
.toast{position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px); background:var(--fg); color:#fff; padding:10px 18px; font-size:11px; letter-spacing:.16em; text-transform:uppercase; opacity:0; transition:all .25s; z-index:60; pointer-events:none;}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}

/* Checkout Modal */
.co-overlay{position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:70; display:none;}
.co-overlay.open{display:block;}
.co-modal{
  position:fixed; bottom:0; left:0; right:0; z-index:71;
  background:#fff; max-height:90vh; overflow-y:auto;
  transform:translateY(100%); transition:transform .3s ease;
  padding:28px 24px 36px; border-radius:16px 16px 0 0;
  box-shadow:0 -10px 40px rgba(0,0,0,.15);
}
.co-modal.open{transform:translateY(0);}
.co-modal h2{font-size:12px; letter-spacing:.16em; text-transform:uppercase; margin-bottom:20px; display:flex; justify-content:space-between; align-items:center;}
.co-modal h2 button{background:none; border:none; font-size:18px; color:var(--muted);}
.co-modal h2 button:hover{color:var(--fg);}

.co-summary{border:1px solid var(--line); padding:14px; margin-bottom:20px; max-height:160px; overflow-y:auto;}
.co-summary .co-item{display:flex; justify-content:space-between; font-size:12px; padding:4px 0;}
.co-summary .co-item .muted{font-size:11px;}
.co-summary .co-total{display:flex; justify-content:space-between; font-size:13px; font-weight:600; border-top:1px solid var(--line); padding-top:8px; margin-top:8px;}

.co-field{display:flex; flex-direction:column; gap:5px; margin-bottom:14px;}
.co-field label{font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted);}
.co-field input,.co-field textarea{border:1px solid var(--line); padding:10px 12px; font:inherit; font-size:13px; outline:none; border-radius:0;}
.co-field input:focus,.co-field textarea:focus{border-color:var(--fg);}

.co-methods{display:flex; gap:10px; margin-bottom:20px;}
.co-method{
  flex:1; padding:16px 12px; border:2px solid var(--line);
  text-align:center; cursor:pointer; transition:all .15s;
  background:#fff;
}
.co-method:hover{border-color:var(--muted);}
.co-method.selected{border-color:var(--fg); background:#fafafa;}
.co-method .co-m-icon{font-size:24px; margin-bottom:6px;}
.co-method .co-m-name{font-size:11px; letter-spacing:.12em; text-transform:uppercase; font-weight:600;}

.co-instructions{
  background:#f7f7f7; border:1px solid var(--line);
  padding:16px; margin-bottom:20px; font-size:13px; line-height:1.6;
}
.co-instructions .co-phone{
  font-size:18px; font-weight:700; letter-spacing:.05em;
  color:var(--fg); margin:8px 0;
}
.co-instructions .co-step{display:flex; gap:10px; margin-bottom:8px;}
.co-instructions .co-step-num{
  width:22px; height:22px; border-radius:999px;
  background:var(--fg); color:#fff; font-size:11px;
  display:flex; align-items:center; justify-content:center; flex:none;
}

.co-submit{
  width:100%; height:48px; background:var(--fg); color:#fff;
  border:none; font-size:11px; letter-spacing:.16em; text-transform:uppercase;
  transition:background .15s;
}
.co-submit:hover{background:var(--accent);}
.co-submit:disabled{opacity:.5;}

.co-success{text-align:center; padding:40px 20px;}
.co-success .co-check{font-size:48px; margin-bottom:16px;}
.co-success h3{font-size:14px; letter-spacing:.14em; text-transform:uppercase; margin-bottom:10px;}
.co-success p{font-size:13px; color:var(--muted); line-height:1.6;}

.co-err{color:#c0392b; font-size:12px; margin-bottom:12px;}

/* Admin Orders */
.order-card{border:1px solid var(--line); padding:16px; margin-bottom:14px;}
.order-card .order-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:12px;}
.order-card .order-id{font-size:11px; color:var(--muted); letter-spacing:.1em;}
.order-card .order-date{font-size:11px; color:var(--muted);}
.order-badge{
  display:inline-block; padding:3px 10px; font-size:10px;
  letter-spacing:.1em; text-transform:uppercase; font-weight:600;
  border-radius:3px;
}
.order-badge.pending{background:#fef3cd; color:#856404;}
.order-badge.confirmed{background:#d4edda; color:#155724;}
.order-badge.denied{background:#f8d7da; color:#721c24;}
.order-customer{font-size:12px; line-height:1.8; margin-bottom:12px;}
.order-customer strong{font-weight:600;}
.order-items{font-size:12px; color:var(--muted); margin-bottom:12px; border-top:1px solid var(--line); padding-top:10px;}
.order-items div{padding:3px 0;}
.order-total{font-size:13px; font-weight:600; margin-bottom:12px;}
.order-actions{display:flex; gap:8px;}
.order-actions button{padding:7px 16px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; border:none; cursor:pointer;}
.order-actions .confirm-btn{background:#28a745; color:#fff;}
.order-actions .confirm-btn:hover{background:#218838;}
.order-actions .deny-btn{background:#dc3545; color:#fff;}
.order-actions .deny-btn:hover{background:#c82333;}
.order-filter{display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap;}
.order-filter button{border:1px solid var(--line); background:none; padding:6px 14px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted);}
.order-filter button.active{background:var(--fg); color:#fff; border-color:var(--fg);}
.order-count{font-size:11px; color:var(--muted); margin-left:auto; display:flex; align-items:center;}

/* Admin */
.admin-wrap{max-width:760px; margin:0 auto; padding:40px 20px 60px;}
.admin-wrap h1{font-size:14px; letter-spacing:.16em; text-transform:uppercase; margin-bottom:28px;}
.card{border:1px solid var(--line); padding:22px; margin-bottom:28px;}
.card h2{font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin-bottom:16px;}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:14px;}
.field label{font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted);}
.field input,.field select,.field textarea{border:1px solid var(--line); padding:9px 11px; font:inherit; font-size:14px; outline:none;}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--fg);}
.row2{display:flex; gap:12px; align-items:flex-end;} .row2>input{flex:1;}
.chk{display:flex; flex-wrap:wrap; gap:8px;}
.chk button{border:1px solid var(--line); background:none; padding:6px 12px; font-size:12px;}
.chk button.on{background:var(--fg); color:#fff; border-color:var(--fg);}
.btn{background:var(--fg); color:#fff; border:none; padding:10px 20px; font-size:11px; letter-spacing:.16em; text-transform:uppercase;}
.btn:hover{background:var(--accent);}
.btn:disabled{opacity:.5;}
.btn.light{background:none; color:var(--muted); border:1px solid var(--line);}
.btn.light:hover{background:none; color:var(--fg);}
.thumbs{display:flex; flex-wrap:wrap; gap:10px; margin-top:8px;}
.thumb{position:relative; width:64px; height:64px;}
.thumb img{width:100%; height:100%; object-fit:cover; border:1px solid var(--line);}
.thumb button{position:absolute; top:-7px; right:-7px; width:18px; height:18px; border-radius:999px; background:#c0392b; color:#fff; border:none; font-size:12px; line-height:1;}
.prod{display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid var(--line);}
.prod img{width:48px; height:48px; object-fit:cover; background:#f3f4f6;}
.prod .pi{flex:1; font-size:12px;}
.prod .pi .muted{font-size:11px;}
.del{background:#c0392b; color:#fff; border:none; padding:6px 12px; font-size:11px; letter-spacing:.1em; text-transform:uppercase;}
.preview{height:140px; background:#f3f4f6; background-size:cover; background-position:center center; background-repeat:no-repeat; margin-bottom:10px;}
.preview.logo{height:80px; background-size:contain;}
.err{color:#c0392b; font-size:12px; margin-top:8px;}

/* Login */
.login{min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#141414,#333);}
.login-box{background:#fff; padding:36px; width:340px; text-align:center;}
.login-box h1{font-family:Georgia,serif; font-style:italic; color:var(--accent); font-size:24px; margin-bottom:18px;}
.login-box input{width:100%; padding:11px 13px; border:1px solid var(--line); margin-bottom:14px; font:inherit;}
.login-box button{width:100%; padding:11px; background:var(--fg); color:#fff; border:none; letter-spacing:.16em; text-transform:uppercase; font-size:11px;}

@media(max-width:600px){
  .drawer{width:100%;}
  .nav{padding:0 56px;}
  /* Restore compact search style on mobile */
  .search-container{border:none; border-bottom:1px solid var(--line); background:transparent; padding:2px 0; width:110px; height:auto;}
  .search-container:focus-within{border-bottom-color:var(--fg);}
  .search-icon{display:none;}
  .search-container input{font-size:10px; letter-spacing:.1em; text-transform:uppercase; width:88px;}
  
  /* Hero image fill fix */
  .hero-img {
    height: 50vh !important;
  }
  .hero-img img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* ── Image Editor Modal ── */
.ie-overlay{
  position:fixed; inset:0; z-index:200;
  background:rgba(0,0,0,.82);
  backdrop-filter:blur(8px);
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity .25s ease;
}
.ie-overlay.open{ opacity:1; pointer-events:auto; }

.ie-header{
  position:absolute; top:0; left:0; right:0;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 24px;
  font-size:12px; letter-spacing:.14em; text-transform:uppercase;
  color:#fff;
}
.ie-header .ie-title{ font-weight:600; }
.ie-close{
  background:none; border:none; color:#fff;
  font-size:22px; cursor:pointer; padding:4px 8px;
  border-radius:6px; transition:background .15s;
}
.ie-close:hover{ background:rgba(255,255,255,.12); }

.ie-canvas-wrap{
  position:relative;
  width:min(80vw, 600px); height:min(70vh, 600px);
  background:repeating-conic-gradient(#1a1a1a 0% 25%, #222 0% 50%) 0 0 / 20px 20px;
  border-radius:12px;
  overflow:hidden;
  cursor:grab;
  touch-action:none;
  box-shadow:0 24px 80px rgba(0,0,0,.5);
}
.ie-canvas-wrap:active{ cursor:grabbing; }
.ie-canvas-wrap canvas{
  position:absolute;
  top:50%; left:50%;
  transform-origin:center center;
}

/* Crop overlay */
.ie-crop-overlay{
  position:absolute; inset:0;
  pointer-events:none;
}
.ie-crop-overlay.active{ pointer-events:auto; cursor:crosshair; }
.ie-crop-box{
  position:absolute;
  border:2px solid #fff;
  box-shadow:0 0 0 9999px rgba(0,0,0,.55);
  display:none;
}
.ie-crop-box.visible{ display:block; }
.ie-crop-box .ie-crop-handle{
  position:absolute; width:12px; height:12px;
  background:#fff; border-radius:2px;
  box-shadow:0 1px 4px rgba(0,0,0,.4);
}
.ie-crop-box .ie-crop-handle.nw{ top:-6px; left:-6px; cursor:nw-resize; }
.ie-crop-box .ie-crop-handle.ne{ top:-6px; right:-6px; cursor:ne-resize; }
.ie-crop-box .ie-crop-handle.sw{ bottom:-6px; left:-6px; cursor:sw-resize; }
.ie-crop-box .ie-crop-handle.se{ bottom:-6px; right:-6px; cursor:se-resize; }

/* Toolbar */
.ie-toolbar{
  position:absolute; bottom:0; left:0; right:0;
  display:flex; align-items:center; justify-content:center;
  gap:12px; flex-wrap:wrap;
  padding:16px 24px;
  background:rgba(20,20,20,.85);
  backdrop-filter:blur(12px);
  border-top:1px solid rgba(255,255,255,.08);
}
.ie-toolbar label{
  font-size:11px; letter-spacing:.12em; text-transform:uppercase;
  color:rgba(255,255,255,.6); white-space:nowrap;
}
.ie-toolbar input[type=range]{
  width:140px; accent-color:var(--accent);
}
.ie-toolbar .ie-val{
  font-size:12px; color:#fff;
  min-width:42px; text-align:center;
  font-variant-numeric:tabular-nums;
}
.ie-btn{
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.15);
  color:#fff; padding:7px 14px;
  font-size:11px; letter-spacing:.12em; text-transform:uppercase;
  border-radius:6px; cursor:pointer;
  transition:background .15s, border-color .15s;
}
.ie-btn:hover{ background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.25); }
.ie-btn.active{ background:var(--accent); border-color:var(--accent); }
.ie-btn.primary{
  background:var(--accent); border-color:var(--accent);
  font-weight:600;
}
.ie-btn.primary:hover{ background:#5355ff; border-color:#5355ff; }
.ie-sep{ width:1px; height:24px; background:rgba(255,255,255,.12); }

/* Rotation display */
.ie-rotate-group{ display:flex; align-items:center; gap:6px; }

/* Edit button on thumbnails */
.thumb .edit-btn{
  position:absolute; bottom:-7px; left:-7px;
  width:18px; height:18px; border-radius:999px;
  background:var(--accent); color:#fff;
  border:none; font-size:10px; line-height:1;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.thumb .edit-btn:hover{ background:#5355ff; }

/* Preview edit button */
.preview-edit-wrap{ position:relative; }
.preview-edit-btn{
  position:absolute; top:8px; right:8px;
  background:rgba(0,0,0,.55); color:#fff;
  border:none; padding:5px 10px;
  font-size:10px; letter-spacing:.12em; text-transform:uppercase;
  border-radius:4px; cursor:pointer;
  opacity:0; transition:opacity .2s;
}
.preview-edit-wrap:hover .preview-edit-btn{ opacity:1; }
.preview-edit-btn:hover{ background:rgba(0,0,0,.75); }
