
/*
Theme Name: Etsy-Like Digital Downloads
Theme URI: https://example.com/themes/etsy-like-digital-downloads
Author: ChatGPT
Description: Etsy-style theme for digital download products. Homepage: logo left, centered search, menu bar, 4x9 product grid with pagination. Single product: left gallery, center preview, right details; 4 related products below.
Version: 1.0.2
License: GPL-2.0-or-later
Text Domain: etsydd
*/
:root{--bg:#fff;--text:#1a1a1a;--muted:#666;--soft:#f6f6f7;--accent:#ff6a00;--border:#e5e7eb;--radius:14px}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}
img{max-width:100%;height:auto;display:block;border-radius:12px}
button,input,select,textarea{font:inherit}

.container{max-width:1200px;margin:0 auto;padding:0 16px}
.header-top{display:grid;grid-template-columns:220px 1fr 220px;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--border)}
.site-logo a{display:flex;align-items:center;gap:10px;font-weight:700;font-size:22px}
.site-logo img{width:40px;height:40px;border-radius:999px}
.search{display:flex;justify-content:center}
.search form{position:relative;width:min(720px,100%)}
.search input[type=search]{width:100%;padding:12px 44px;border:1px solid var(--border);border-radius:999px;background:#fff}
.search button{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:var(--accent);color:#fff;padding:10px 14px;border-radius:999px;cursor:pointer}

.header-nav{border-bottom:1px solid var(--border);background:var(--soft)}
.header-nav .nav{display:flex;gap:18px;padding:10px 0;flex-wrap:wrap}
.header-nav .nav a{padding:8px 10px;border-radius:8px}
.header-nav .nav a:hover{background:#fff;border:1px solid var(--border)}

.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.card{border:1px solid var(--border);border-radius:var(--radius);background:#fff;overflow:hidden;display:flex;flex-direction:column}
.card .thumb{aspect-ratio:4/3;background:var(--soft);overflow:hidden}
.card .body{padding:12px}
.card .title{font-weight:600;font-size:15px;line-height:1.4;max-height:2.8em;overflow:hidden}
.card .meta{display:flex;justify-content:space-between;align-items:center;margin-top:8px;color:var(--muted);font-size:14px}
.price{font-weight:700;color:var(--text)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:10px;border:1px solid var(--border);background:#fff;cursor:pointer}
.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn.block{width:100%}

.pagination{display:flex;gap:10px;justify-content:center;margin:28px 0}
.pagination a, .pagination span{padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:#fff}
.pagination .current{background:var(--accent);color:#fff;border-color:var(--accent)}

.single-wrap{display:grid;grid-template-columns:220px 1fr 360px;gap:24px;margin-top:22px}
.gallery{display:flex;flex-direction:column;gap:12px}
.gallery img{cursor:pointer;border:1px solid var(--border)}
.preview{border:1px solid var(--border);border-radius:var(--radius);padding:8px;background:#fff}
.details{border:1px solid var(--border);border-radius:var(--radius);padding:18px;background:#fff;height:fit-content;position:sticky;top:12px}
.details h1{margin:0 0 8px 0;font-size:26px}
.details .desc{color:var(--muted);font-size:15px}
.related{margin-top:36px}
.related h3{margin-bottom:12px}

.site-footer{padding:36px 0;border-top:1px solid var(--border);margin-top:40px;color:var(--muted)}
@media (max-width: 980px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .single-wrap{grid-template-columns:1fr}
  .details{position:relative}
  .header-top{grid-template-columns:1fr}
  .search{order:2}
}


.badge{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid var(--border);background:#fff;margin-bottom:6px}
.badge.free{background:var(--accent);border-color:var(--accent);color:#fff}


.gallery img.is-active{outline:2px solid var(--accent); outline-offset:2px}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700;border:1px solid var(--border);background:#fff;margin-bottom:6px}
.badge.free{background:var(--accent);border-color:var(--accent);color:#fff}
