*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg-start:#424242; --bg-end:#191919; --accent:rgba(108,99,213,.8); }
body {
    min-height:100vh;
    background:linear-gradient(135deg,var(--bg-start) 0%,#4d4d4d 60%,var(--bg-end) 100%);
    font-family:'Cairo','Segoe UI',sans-serif; color:#f3f3f3;
    animation:pageIn .5s ease both;
}
@keyframes pageIn { from{opacity:0} to{opacity:1} }

.pub-header {
    position:sticky; top:0; z-index:50;
    background:rgba(30,30,30,.85); border-bottom:1px solid rgba(255,255,255,.08);
    backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
    padding:14px 24px; display:flex; align-items:center; justify-content:space-between;
}
.pub-logo {
    height: 34px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .88;
    display: block;
}

.container { max-width:1100px; margin:0 auto; padding:32px 20px; }

.coll-hero { text-align:center; margin-bottom:40px; }
.coll-cover { width:100%; max-height:260px; object-fit:cover; border-radius:20px; margin-bottom:20px; }
.coll-name { font-size:2rem; font-weight:900; margin-bottom:8px;
    background:linear-gradient(135deg,#a0a0a0 0%,#f0f0f0 50%,#888 100%);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.coll-desc { font-size:.9rem; color:rgba(255,255,255,.5); max-width:600px; margin:0 auto; line-height:1.7; }

.section-title {
    font-size:1rem; font-weight:700; color:rgba(255,255,255,.6);
    margin-bottom:20px; border-bottom:1px solid rgba(255,255,255,.08);
    padding-bottom:10px;
}

.products-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:18px; }
.product-card {
    background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.09);
    border-radius:14px; overflow:hidden; text-decoration:none; color:inherit;
    transition:transform .2s,box-shadow .2s;
}
.product-card:hover { transform:translateY(-3px); box-shadow:0 16px 40px rgba(0,0,0,.4); }
.product-img { height:160px; overflow:hidden; background:rgba(255,255,255,.05); display:flex; align-items:center; justify-content:center; }
.product-img img { width:100%; height:100%; object-fit:cover; }
.product-img-placeholder { font-size:2rem; color:rgba(255,255,255,.1); }
.product-body { padding:14px; }
.product-name { font-size:.88rem; font-weight:700; margin-bottom:4px; }
.product-meta { font-size:.75rem; color:rgba(255,255,255,.4); }

.empty { text-align:center; padding:60px 20px; color:rgba(255,255,255,.3); font-size:.9rem; }
.pub-footer { text-align:center; padding:24px; font-size:.72rem; color:rgba(255,255,255,.2); letter-spacing:1px; text-transform:uppercase; }

.admin-bar { background:rgba(108,99,213,.12); border-bottom:1px solid rgba(108,99,213,.2); padding:8px 24px; display:flex; align-items:center; gap:12px; font-size:.78rem; color:rgba(200,195,255,.7); flex-wrap:wrap; }
.admin-bar a { color:rgba(160,150,255,.85); text-decoration:none; }

.admin-bar-dashboard-link { color:rgba(200,195,255,.7);text-decoration:none;font-size:.8rem;font-weight:600; }

/* Fixed scroll-down button */
.fixed-scroll-btn {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(22,22,28,.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    padding: 0;
    opacity: .68;
    box-shadow: 0 6px 24px rgba(0,0,0,.42);
    transition: opacity .3s ease, transform .3s ease, box-shadow .3s ease;
    display: flex; align-items: center; justify-content: center;
}
.fixed-scroll-btn:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0 14px 40px rgba(0,0,0,.52), 0 0 22px rgba(108,99,213,.14);
}
.fixed-scroll-btn:active {
    transform: translateX(-50%) scale(.92);
    transition-duration: .1s;
}
.fixed-scroll-btn img { width: 28px; height: 28px; display: block; object-fit: contain; }

@media (max-width: 900px) {
    .container { padding: 24px 16px; }
    .coll-hero { margin-bottom: 28px; }
    .coll-name { font-size: 1.6rem; }
    .coll-cover { max-height: 220px; }
    .fixed-scroll-btn { width: 48px; height: 48px; }
    .fixed-scroll-btn img { width: 24px; height: 24px; }
}

@media (max-width: 640px) {
    .pub-header { padding: 12px 14px; }
    .pub-logo { height: 28px; }
    .container { padding: 18px 12px; }
    .coll-name { font-size: 1.35rem; }
    .coll-cover { max-height: 180px; border-radius: 14px; }
    .coll-desc { font-size: .84rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .product-img { height: 130px; }
    .product-body { padding: 10px; }
    .product-name { font-size: .82rem; }
    .section-title { font-size: .9rem; }
    .fixed-scroll-btn { bottom: 16px; width: 42px; height: 42px; }
    .fixed-scroll-btn img { width: 20px; height: 20px; }
}

@media (max-width: 400px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-img { height: 120px; }
    .coll-name { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
