.aps-category-grid,
.aps-product-grid {
    display: grid;
    gap: 30px;
    margin: 24px 0;
    box-sizing: border-box;
}

.aps-category-grid *,
.aps-product-grid *,
.aps-single-box * {
    box-sizing: border-box;
}

.aps-columns-1 { grid-template-columns: 1fr; }
.aps-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aps-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aps-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aps-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.aps-columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.aps-category-card,
.aps-product-card,
.aps-single-box {
    background: var(--aps-card-bg, #0d0d0d);
    border: 1px solid var(--aps-border-color, #252525);
    border-radius: 10px;
    box-shadow: none;
}

.aps-category-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, border-color .2s ease;
}

.aps-category-card:hover,
.aps-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 217, 230, .45);
}

.aps-category-title,
.aps-product-title,
.aps-product-title a {
    color: var(--aps-title-color, #fff) !important;
}

.aps-category-title {
    font-size: 19px;
    font-weight: 800;
}

.aps-category-count,
.aps-product-meta,
.aps-product-excerpt,
.aps-detail-value {
    color: var(--aps-text-color, #a9a9a9);
}

.aps-product-card {
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 545px;
    height: 100%;
    transition: transform .2s ease, border-color .2s ease;
}

.aps-product-media {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    background: #090909;
}

.aps-product-image {
    display: block;
    aspect-ratio: 3 / 2;
    background: #111;
    overflow: hidden;
}

.aps-ratio-thumbnail .aps-product-image,
.aps-ratio-1-1 .aps-product-image { aspect-ratio: 1 / 1; }
.aps-ratio-4-3 .aps-product-image { aspect-ratio: 4 / 3; }
.aps-ratio-3-2 .aps-product-image { aspect-ratio: 3 / 2; }
.aps-ratio-16-9 .aps-product-image { aspect-ratio: 16 / 9; }
.aps-ratio-3-4 .aps-product-image { aspect-ratio: 3 / 4; }

.aps-product-image img {
    width: 100%;
    height: 100%;
    object-fit: var(--aps-image-fit, cover);
    display: block;
    padding: 0;
    transition: transform .35s ease;
}

.aps-fit-cover .aps-product-image img {
    object-fit: cover;
    padding: 0;
}

.aps-fit-contain .aps-product-image img {
    object-fit: contain;
    padding: 8px;
}

.aps-zoom-on .aps-product-card:hover .aps-product-image img {
    transform: scale(1.06);
}

.aps-placeholder-image {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #777;
    font-weight: 700;
}

.aps-hot-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--aps-hot-bg, #00d9e6);
    color: var(--aps-hot-text, #061012);
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    animation: apsHotBlink 1s infinite;
}

@keyframes apsHotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.96); }
}

.aps-product-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 26px 24px 26px;
}

.aps-card-size-compact .aps-product-body { padding: 20px; }
.aps-card-size-large .aps-product-body { padding: 30px 28px; }

.aps-card-eyebrow {
    margin: 0 0 12px;
    color: #00d9e6;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.aps-product-title {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 900;
}

.aps-card-size-compact .aps-product-title { font-size: 20px; }
.aps-card-size-large .aps-product-title { font-size: 26px; }

.aps-product-title a,
.aps-link {
    text-decoration: none;
}

.aps-equal-cards .aps-product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.2em * 2);
}

.aps-product-price,
.aps-single-price {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 900;
    color: var(--aps-price-color, #00d9e6);
}

.aps-card-size-compact .aps-product-price { font-size: 16px; }
.aps-card-size-large .aps-product-price { font-size: 20px; }

.aps-card-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    margin: 4px 0 16px;
}

.aps-card-spec {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--aps-text-color, #a9a9a9);
    font-size: 14px;
    line-height: 1.35;
}

.aps-spec-icon {
    flex: 0 0 auto;
    width: 18px;
    text-align: center;
    color: #00d9e6;
    font-size: 15px;
    line-height: 1;
}

.aps-product-meta,
.aps-product-excerpt {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
}

.aps-equal-cards .aps-product-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 2;
}

.aps-card-actions {
    display: block;
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .09);
    padding-top: 20px;
}

.aps-equal-cards .aps-card-actions {
    margin-top: auto;
}

.aps-button,
.aps-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 900;
    text-align: center;
    line-height: 1.15;
    transition: opacity .2s ease, transform .2s ease;
    overflow-wrap: normal;
    word-break: normal;
}

.aps-button::before {
    content: "◉";
    margin-right: 8px;
    font-size: 13px;
}

.aps-card-size-compact .aps-button,
.aps-card-size-compact .aps-link {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.aps-card-size-large .aps-button,
.aps-card-size-large .aps-link {
    min-height: 50px;
    padding: 14px 18px;
}

.aps-button {
    background: var(--aps-button-bg, #fff);
    color: var(--aps-button-text, #111) !important;
}

.aps-link {
    background: var(--aps-details-button-bg, #fff);
    color: var(--aps-details-button-text, #111) !important;
}

.aps-button:hover,
.aps-link:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.aps-single-box {
    padding: 24px;
    margin-top: 24px;
}

.aps-details {
    margin-top: 24px;
}

.aps-details h3 {
    margin-bottom: 14px;
    color: var(--aps-title-color, #fff);
}

.aps-details-table {
    display: grid;
    border-top: 1px solid var(--aps-border-color, #252525);
}

.aps-detail-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--aps-border-color, #252525);
}

.aps-detail-label {
    font-weight: 800;
    color: var(--aps-title-color, #fff);
}

.aps-empty {
    padding: 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
}

@media (max-width: 900px) {
    .aps-columns-3,
    .aps-columns-4,
    .aps-columns-5,
    .aps-columns-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .aps-category-grid,
    .aps-product-grid,
    .aps-columns-2,
    .aps-columns-3,
    .aps-columns-4,
    .aps-columns-5,
    .aps-columns-6 {
        grid-template-columns: 1fr;
    }

    .aps-product-card {
        min-height: 0;
    }

    .aps-product-body {
        padding: 22px 20px;
    }

    .aps-card-specs {
        gap: 12px 18px;
    }

    .aps-detail-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
