/* assets/css/catalog.css — product grid with square 500x500 cards. */

.ct-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.ct-search {
    flex: 1 1 260px;
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px; height: 42px;
    border: 1px solid var(--line-strong); border-radius: 12px;
    background: var(--surface);
    transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.ct-search:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(58,167,232,.14); }
.ct-search svg { width: 16px; height: 16px; color: var(--ink-3); flex: 0 0 auto; }
.ct-search input {
    flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent;
    font-size: 13.5px; font-family: inherit; color: var(--ink);
}
.ct-count { font-size: 12px; color: var(--ink-3); }
.ct-count b { color: var(--sky-d); }

.ct-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.ct-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--line); border-radius: 16px;
    background: var(--surface); overflow: hidden;
    transition: border-color .15s var(--ease), transform .14s var(--ease), box-shadow .15s var(--ease);
}
.ct-card:hover { border-color: var(--sky-l); transform: translateY(-2px); box-shadow: 0 16px 34px -24px rgba(58,167,232,.65); }
.ct-card.is-out { opacity: .62; }
.ct-card.is-out:hover { transform: none; }

/* square artwork, matching the 500x500 upload guidance */
.ct-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg-sky);
    display: grid; place-items: center;
    overflow: hidden;
}
/* contain, not cover: a small uploaded logo was being blown up to fill a 190px
   square and read as a blurred smear. Padding keeps it sitting inside the tile. */
.ct-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; display: block; }
.ct-img > span:only-child { font-size: 42px; font-weight: 800; color: var(--sky); }

.ct-hot, .ct-disc, .ct-out {
    position: absolute; font-size: 9.5px; font-weight: 800; letter-spacing: .05em;
    padding: 3px 8px; border-radius: 999px;
}
.ct-hot { top: 8px; left: 8px; background: #ffe9e9; color: #d9534f; border: 1px solid #f5c7c7; }
.ct-disc { top: 8px; right: 8px; background: #fff3d6; color: #a06f00; border: 1px solid #f0dba8; }
.ct-out {
    left: 50%; top: 50%; transform: translate(-50%, -50%);
    background: rgba(22,35,46,.78); color: #fff;
    font-size: 11px; padding: 6px 14px;
}

.ct-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ct-name {
    font-size: 13.5px; font-weight: 700; line-height: 1.35; margin: 0; color: var(--ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ct-desc {
    font-size: 11.5px; color: var(--ink-3); margin: 0; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ct-price { display: flex; align-items: baseline; gap: 7px; margin-top: auto; }
.ct-price-net { font-size: 17px; font-weight: 800; color: var(--sky-d); letter-spacing: -.02em; }
.ct-price-old { font-size: 11.5px; color: var(--ink-3); text-decoration: line-through; }
.ct-range { font-size: 10.5px; color: var(--ink-3); }

.ct-buy { display: flex; align-items: center; gap: 7px; margin-top: 4px; }

.qty {
    display: flex; align-items: center;
    border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden;
    background: var(--surface);
}
.qty button {
    width: 30px; height: 32px; border: 0; background: transparent;
    color: var(--ink-2); font-size: 15px; font-weight: 700; cursor: pointer;
    font-family: inherit; line-height: 1;
    transition: background-color .13s var(--ease);
}
.qty button:hover { background: var(--bg-sky); color: var(--sky-d); }
.qty input {
    width: 34px; height: 32px; border: 0; text-align: center;
    font-size: 13px; font-weight: 700; font-family: inherit; color: var(--ink);
    background: transparent; outline: none;
    -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ct-buy .btn { flex: 1 1 auto; }

@media (max-width: 720px) {
    .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ct-name { font-size: 12.5px; }
    .ct-price-net { font-size: 15px; }
    .qty button { width: 26px; }
    .qty input { width: 28px; }
}
@media (max-width: 380px) {
    .ct-grid { grid-template-columns: minmax(0, 1fr); }
}

html.theme-dark .ct-hot { background: #3a1f1f; border-color: #5a2c2c; color: #f08989; }
html.theme-dark .ct-disc { background: #3a2c12; border-color: #5a451f; color: #e8bd70; }

/* category chips on product cards and the sub-category strip */
.ct-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.ct-cat-chip {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    background: var(--bg-sky); color: var(--sky-d);
    font-size: 11px; font-weight: 600; line-height: 1.7;
}
.ct-subnav { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-subchip {
    display: inline-block; padding: 7px 16px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface);
    font-size: 13px; color: var(--ink-2); text-decoration: none;
    transition: border-color .14s var(--ease), background .14s var(--ease);
}
.ct-subchip:hover { border-color: var(--sky-l); color: var(--sky-d); }
.ct-subchip.is-on { background: var(--sky); border-color: var(--sky); color: #fff; font-weight: 600; }
.ct-group-head { margin-bottom: 6px; }

/* grouped catalogue: each main category is its own block, no inner section padding */
.ct-group-section { padding-top: 18px; padding-bottom: 8px; }
.ct-group-section .section-head { margin-bottom: 12px; }
