/* ProTechTrader Modern Category Design 2026 */

/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root {
    --ptt-primary: #1a1a1a;
    --ptt-secondary: #4a5568;
    --ptt-accent: #3b82f6; /* Blue-500 */
    --ptt-accent-dark: #2563eb; /* Blue-600 */
    --ptt-accent-light: #60a5fa;
    --ptt-bg-card: #ffffff;
    --ptt-bg-body: #f8fafc;
    --ptt-border: #e2e8f0;
    --ptt-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ptt-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ptt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --ptt-radius: 8px;
    --ptt-font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.s_modern_category {
    font-family: var(--ptt-font-sans);
    color: var(--ptt-primary);
    padding: 20px 0 60px 0;
}

/* ==========================================================================
   LAYOUT & GRID
   ========================================================================== */
.ptt-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 960px) {
    .ptt-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .ptt-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 400px) {
    .ptt-product-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PRODUCT CARD
   ========================================================================== */
.ptt-card {
    background: var(--ptt-bg-card);
    border: 1px solid var(--ptt-border);
    border-radius: var(--ptt-radius);
    padding: 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.ptt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ptt-shadow-lg);
    border-color: var(--ptt-accent-light);
    z-index: 2;
}

.ptt-card-image {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.ptt-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.ptt-card-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--ptt-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px; /* Fixed height for alignment */
}

.ptt-card-title a {
    color: inherit;
    text-decoration: none;
}

.ptt-card-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ptt-price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ptt-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--ptt-primary);
}

.ptt-price-old {
    font-size: 13px;
    text-decoration: line-through;
    color: var(--ptt-secondary);
}

.ptt-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.ptt-stars-svg {
    display: flex;
    color: #fbbf24; /* Amber-400 */
}

.ptt-stars-svg svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.ptt-review-count {
    color: var(--ptt-secondary);
    font-size: 11px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.ptt-btn-add {
    width: 100%;
    background: var(--ptt-accent);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.ptt-btn-add:hover {
    background: var(--ptt-accent-dark);
    color: white;
}

.ptt-actions-row {
    display: flex;
    gap: 8px;
}

.ptt-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ptt-border);
    border-radius: 6px;
    color: var(--ptt-secondary);
    background: white;
    transition: all 0.2s;
    cursor: pointer;
}

.ptt-icon-btn:hover {
    border-color: var(--ptt-accent);
    color: var(--ptt-accent);
    background: #f0f9ff;
}

/* ==========================================================================
   HEADER & SUBCATEGORIES
   ========================================================================== */
.ptt-header {
    margin-bottom: 32px;
    text-align: left;
}

.ptt-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.ptt-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ptt-secondary);
    max-width: 800px;
}

.ptt-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.ptt-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: white;
    border: 1px solid var(--ptt-border);
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ptt-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.ptt-pill:hover {
    border-color: var(--ptt-accent);
    color: var(--ptt-accent);
    transform: translateY(-1px);
    box-shadow: var(--ptt-shadow-sm);
}

.ptt-pill img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ==========================================================================
   TOOLBAR
   ========================================================================== */
.ptt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--ptt-border);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.ptt-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ptt-select {
    padding: 6px 12px;
    border: 1px solid var(--ptt-border);
    border-radius: 4px;
    font-size: 14px;
    color: var(--ptt-secondary);
    background: white;
    cursor: pointer;
}

.ptt-select:hover {
    border-color: var(--ptt-accent);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.ptt-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.ptt-pagination a, .ptt-pagination b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
}

.ptt-pagination a {
    background: white;
    border: 1px solid var(--ptt-border);
    color: var(--ptt-secondary);
}

.ptt-pagination a:hover {
    border-color: var(--ptt-accent);
    color: var(--ptt-accent);
}

.ptt-pagination b {
    background: var(--ptt-accent);
    color: white;
    border: 1px solid var(--ptt-accent);
}

/* Override Shoppica global interference */
.s_wrap #content {
    /* Ensure we don't get double padding if possible */
}
