/* ============================================
   RSAG Products Plugin Stylesheet
   Matches rsagsealings.com style
   ============================================ */

/* ─── Variables ───────────────────────────── */
:root {
    --rsag-primary:    #1a73e8;
    --rsag-dark:       #1a1a2e;
    --rsag-text:       #333333;
    --rsag-light-bg:   #f5f7fa;
    --rsag-border:     #e0e0e0;
    --rsag-card-hover: #f0f4ff;
    --rsag-radius:     8px;
    --rsag-shadow:     0 2px 12px rgba(0,0,0,0.08);
    --rsag-font:       'Poppins', sans-serif;
}

/* ─── Page Wrapper ────────────────────────── */
.rsag-page-wrapper {
    font-family: var(--rsag-font);
    color: var(--rsag-text);
}

.rsag-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.rsag-section {
    padding: 60px 0;
}

.rsag-bg-light {
    background: var(--rsag-light-bg);
}

/* ─── Breadcrumb ──────────────────────────── */
.rsag-breadcrumb-bar,
.rsag-page-header {
    background: var(--rsag-dark);
    color: #fff;
    padding: 20px 0;
}

.rsag-breadcrumb {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
}

.rsag-breadcrumb a {
    color: #aac7ff;
    text-decoration: none;
}

.rsag-breadcrumb a:hover { text-decoration: underline; }

.rsag-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.rsag-page-desc {
    color: #ccc;
    margin-top: 8px;
}

/* ─── Section Title ───────────────────────── */
.rsag-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--rsag-dark);
    margin-bottom: 36px;
    text-align: center;
    position: relative;
}

.rsag-section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--rsag-primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ─── Grid Layouts ────────────────────────── */
.rsag-categories-grid,
.rsag-products-grid {
    display: grid;
    gap: 24px;
}

.rsag-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rsag-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rsag-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .rsag-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .rsag-cols-3,
    .rsag-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .rsag-cols-2 { grid-template-columns: 1fr; }
    .rsag-product-detail-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
    .rsag-cols-2,
    .rsag-cols-3,
    .rsag-cols-4 { grid-template-columns: 1fr; }
}

/* ─── Category Card ───────────────────────── */
.rsag-category-card {
    background: #fff;
    border-radius: var(--rsag-radius);
    overflow: hidden;
    box-shadow: var(--rsag-shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

.rsag-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.rsag-category-card a { text-decoration: none; color: inherit; }

.rsag-category-img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f4ff;
}

.rsag-category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.rsag-category-info {
    padding: 16px;
    text-align: center;
}

.rsag-category-info h3,
.rsag-category-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rsag-dark);
    margin: 0 0 12px;
    line-height: 1.4;
}

/* ─── Product Card ────────────────────────── */
.rsag-product-card {
    background: #fff;
    border-radius: var(--rsag-radius);
    overflow: hidden;
    box-shadow: var(--rsag-shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid var(--rsag-border);
}

.rsag-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--rsag-primary);
}

.rsag-product-card a { text-decoration: none; color: inherit; }

.rsag-product-img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsag-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.3s;
}

.rsag-product-card:hover .rsag-product-img img {
    transform: scale(1.06);
}

.rsag-product-info {
    padding: 16px;
    text-align: center;
}

.rsag-product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rsag-dark);
    margin: 0 0 6px;
    line-height: 1.4;
}

.rsag-product-code {
    font-size: 0.8rem;
    color: var(--rsag-primary);
    font-weight: 500;
    margin: 0 0 8px;
}

.rsag-excerpt {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px;
}

/* ─── Buttons ─────────────────────────────── */
.rsag-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--rsag-primary);
    color: #fff;
    border: 2px solid var(--rsag-primary);
}

.rsag-btn:hover {
    background: #1558c0;
    border-color: #1558c0;
    color: #fff;
}

.rsag-btn-outline {
    background: transparent;
    color: var(--rsag-primary);
}

.rsag-btn-outline:hover {
    background: var(--rsag-primary);
    color: #fff;
}

.rsag-btn-primary {
    background: var(--rsag-primary);
    color: #fff;
    padding: 12px 30px;
    font-size: 1rem;
}

.rsag-btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ─── Product Detail Page ─────────────────── */
.rsag-product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.rsag-product-detail-img {
    position: sticky;
    top: 80px;
}

.rsag-main-img {
    width: 100%;
    border-radius: var(--rsag-radius);
    box-shadow: var(--rsag-shadow);
    object-fit: contain;
    background: #f8f8f8;
    padding: 20px;
}

.rsag-product-code-badge {
    display: inline-block;
    background: #e8f0fe;
    color: var(--rsag-primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.rsag-product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--rsag-dark);
    margin: 0 0 12px;
    line-height: 1.3;
}

.rsag-product-category-tag {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.rsag-product-category-tag a {
    color: var(--rsag-primary);
    text-decoration: none;
    font-weight: 500;
}

.rsag-product-description {
    font-size: 1rem;
    line-height: 1.75;
    color: #444;
    margin-bottom: 28px;
}

/* ─── Specs Table ─────────────────────────── */
.rsag-specs-wrapper {
    margin-bottom: 28px;
}

.rsag-specs-wrapper h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--rsag-dark);
    margin-bottom: 14px;
}

.rsag-table-responsive {
    overflow-x: auto;
}

.rsag-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border: 1px solid var(--rsag-border);
    border-radius: var(--rsag-radius);
    overflow: hidden;
}

.rsag-specs-table thead tr {
    background: var(--rsag-dark);
    color: #fff;
}

.rsag-specs-table th,
.rsag-specs-table td {
    padding: 12px 16px;
    text-align: center;
    border: 1px solid var(--rsag-border);
}

.rsag-specs-table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-color: rgba(255,255,255,0.1);
}

.rsag-specs-table tbody tr:nth-child(even) {
    background: var(--rsag-light-bg);
}

.rsag-specs-table tbody tr:hover {
    background: #e8f0fe;
}

/* ─── Product CTA ─────────────────────────── */
.rsag-product-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* ─── Empty State ─────────────────────────── */
.rsag-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.rsag-empty p { font-size: 1.1rem; margin-bottom: 20px; }

/* ─── Related Products Section ────────────── */
.rsag-related-section { padding: 60px 0; }
