* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: #f4f5f7; color: #171717; min-height: 100vh; }

header { background: #111; color: #fff; padding: 25px 20px; }
.header-content { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.logo { font-size: 28px; font-weight: 700; }
.counter { background: #fff; color: #111; padding: 10px 16px; border-radius: 50px; font-weight: bold; }
.header-link { color: #fff; font-size: 14px; text-decoration: underline; }

main { max-width: 1100px; margin: 40px auto; padding: 0 20px; }

.wishlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }

.card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 5px 25px rgba(0,0,0,.08); transition: transform .2s ease, box-shadow .2s ease; position: relative; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }

.badge-sale { position: absolute; top: 12px; left: 12px; background: #d6001c; color: #fff; font-weight: bold; font-size: 13px; padding: 6px 10px; border-radius: 50px; z-index: 1; }

.image-container { width: 100%; height: 330px; background: #f1f1f1; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.product-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.image-error { display: none; text-align: center; color: #888; padding: 20px; }

.card-content { padding: 20px; }
.brand { font-size: 12px; font-weight: bold; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 7px; }
.product-name { font-size: 20px; line-height: 1.3; margin-bottom: 8px; }
.color { color: #666; font-size: 14px; margin-bottom: 15px; }

.price { font-size: 22px; font-weight: bold; margin-bottom: 18px; }
.price.is-sale { color: #d6001c; }
.old-price { color: #999; font-size: 14px; font-weight: normal; text-decoration: line-through; margin-left: 8px; }

.size-label { display: block; font-size: 14px; font-weight: bold; margin-bottom: 7px; }
.size-select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 9px; background: #fff; font-size: 15px; margin-bottom: 18px; cursor: pointer; }
.size-select:focus { outline: none; border-color: #111; }

.open-button { display: block; width: 100%; background: #111; color: #fff; border: none; border-radius: 9px; padding: 13px; font-weight: bold; cursor: pointer; font-size: 14px; text-align: center; text-decoration: none; }
.open-button:hover { background: #333; }

.empty { grid-column: 1 / -1; background: #fff; border-radius: 18px; padding: 60px 20px; text-align: center; color: #777; }
.empty h3 { color: #111; margin-bottom: 8px; }

/* ---------- ADMIN ---------- */
.panel { background: #fff; border-radius: 18px; padding: 25px; box-shadow: 0 5px 25px rgba(0,0,0,.06); margin-bottom: 30px; }
.panel h2 { margin-bottom: 18px; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.field input { width: 100%; padding: 11px; border: 1px solid #ddd; border-radius: 9px; font-size: 15px; }
.field input:focus { outline: none; border-color: #111; }
.field small { color: #888; font-size: 12px; }
.btn { background: #111; color: #fff; border: none; border-radius: 9px; padding: 12px 20px; font-weight: bold; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block; }
.btn:hover { background: #333; }
.btn-light { background: #eee; color: #111; }
.btn-light:hover { background: #ddd; }
.btn-danger { background: #d6001c; }
.btn-danger:hover { background: #a80016; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; }
.alert-ok { background: #eafaf0; color: #146c2e; }
.alert-err { background: #fff0f0; color: #b00020; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee; font-size: 14px; vertical-align: middle; }
th { color: #888; font-size: 12px; text-transform: uppercase; }
.thumb { width: 50px; height: 50px; object-fit: contain; background: #f1f1f1; border-radius: 6px; }
.actions { display: flex; gap: 6px; }
.table-wrap { overflow-x: auto; }
.login-box { max-width: 380px; margin: 80px auto; }

@media (max-width: 700px) {
    .logo { font-size: 22px; }
    .counter { font-size: 14px; }
    main { margin-top: 25px; }
    .wishlist { grid-template-columns: 1fr; }
    .image-container { height: 300px; }
    .form-grid { grid-template-columns: 1fr; }
}
