/* =============================================
   TRMT Product Grid
   ============================================= */

.trmt-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.trmt-chip {
    padding: 8px 18px;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    color: #374151;
}

.trmt-chip:hover,
.trmt-chip--active {
    background: var(--chip-color, #1a1a2e);
    color: #fff;
    border-color: var(--chip-color, #1a1a2e);
}

.trmt-chip--active[data-filter="all"] {
    background: #1a1a2e;
    border-color: #1a1a2e;
}

/* Grid */
.trmt-grid {
    display: grid;
    gap: 24px;
}

.trmt-grid--cols-1  { grid-template-columns: repeat(1,  1fr); }
.trmt-grid--cols-2  { grid-template-columns: repeat(2,  1fr); }
.trmt-grid--cols-3  { grid-template-columns: repeat(3,  1fr); }
.trmt-grid--cols-4  { grid-template-columns: repeat(4,  1fr); }
.trmt-grid--cols-5  { grid-template-columns: repeat(5,  1fr); }
.trmt-grid--cols-6  { grid-template-columns: repeat(6,  1fr); }
.trmt-grid--cols-7  { grid-template-columns: repeat(7,  1fr); }
.trmt-grid--cols-8  { grid-template-columns: repeat(8,  1fr); }
.trmt-grid--cols-9  { grid-template-columns: repeat(9,  1fr); }
.trmt-grid--cols-10 { grid-template-columns: repeat(10, 1fr); }
.trmt-grid--cols-11 { grid-template-columns: repeat(11, 1fr); }
.trmt-grid--cols-12 { grid-template-columns: repeat(12, 1fr); }

/* Card */
.trmt-card {
    border-radius: 16px;
    overflow: visible;
    background: #fff;
    transition: transform .2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.trmt-card--shadow { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

.trmt-card:hover {
    transform: translateY(-3px);
    z-index: 99;
}

.trmt-card--hidden { display: none; }

/* Image wrap */
.trmt-card__image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    overflow: hidden;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid #f3f4f6;
}

.trmt-card__image-wrap a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;     
    justify-content: center;
    padding-top: 30px;
}

.trmt-card__img {
    width: 70%;                   
    height: 70%;                 
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* Badge */
.trmt-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 14px;
    border-radius: 50px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}

/* Heart */
.trmt-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    transition: color .2s;
    z-index: 2;
}

.trmt-heart:hover,
.trmt-heart.trmt-heart--saved { color: #ef4444; }
.trmt-heart--saved svg         { fill: #ef4444; }

/* Zoom lens */
.trmt-card__zoom-lens {
    display: none;
    position: absolute;
    border: 2px solid #1a1a2e;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    pointer-events: none;
    z-index: 5;
}

/* Zoom result */
.trmt-card__zoom-result {
    display: none;
    position: fixed;
    width: 300px;
    height: 300px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-repeat: no-repeat;
    background-color: #f9fafb;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    pointer-events: none;
    z-index: 9999;
}

/* Card body */
.trmt-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trmt-card__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.trmt-card__title a {
    color: inherit;
    text-decoration: none;
}

.trmt-card__desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.5;
}

.trmt-cta-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: #1a1a2e;
    color: #fff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
    box-sizing: border-box;
    margin-top: auto;
}

.trmt-cta-btn:hover { opacity: .85; color: #fff; }

/* Pagination */
.trmt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.trmt-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 50px;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    color: #374151;
}

.trmt-page-btn:hover:not([disabled]) {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

.trmt-page-btn--active {
    background: #1a1a2e !important;
    color: #fff !important;
    border-color: #1a1a2e !important;
}

.trmt-page-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .trmt-grid--cols-3,
    .trmt-grid--cols-4,
    .trmt-grid--cols-5 { grid-template-columns: repeat(2, 1fr) !important; }
    .trmt-card__zoom-result { display: none !important; }
    .trmt-card__zoom-lens   { display: none !important; }
}

@media (max-width: 480px) {
    .trmt-grid { grid-template-columns: 1fr !important; }
}