/* =========================================================
   website-category.css — Category & Subcategory pages
   Location: public/assets/css/website-category.css
   ========================================================= */

.back-link {
    display: inline-block;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: 600;
}
.back-link:hover {
    color: var(--brown);
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    padding: 0 6% 90px;
}

.item-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(30,36,48,0.08), 0 16px 32px rgba(30,36,48,0.1);
}

/* Uniform Fixed Image Container & Image Sizing */
.item-img-wrapper {
    width: 100%;
    height: 220px;
    background: #f8f4f0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.item-img {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform 0.3s ease;
}

.item-card:hover .item-img {
    transform: scale(1.05);
}

.item-img-placeholder {
    width: 100%;
    height: 220px;
    background: var(--brown-soft);
    color: var(--brown);
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.item-desc {
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--brown);
}

.item-stock {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.item-link {
    display: block;
    text-align: center;
    margin-top: auto;
    padding: 10px;
    border-radius: 8px;
    background: var(--brown-soft);
    color: var(--brown);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.item-link:hover {
    background: var(--brown);
    color: #ffffff;
}
