/* ====== SegSteel Products Frontend Styles ====== */

/* -- Archive/Category Grid -- */
.sp-archive-header {
    background: var(--primary, #1B2B48);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.sp-archive-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #fff;
}
.sp-archive-header p {
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}
.sp-category-hero {
    padding: 40px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
.sp-category-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27,43,72,0.5);
    border-radius: 8px;
}
.sp-category-hero h1,
.sp-category-hero p {
    position: relative;
    z-index: 1;
}

/* -- Category Filter -- */
.sp-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}
.sp-filter-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    transition: 0.3s;
}
.sp-filter-btn:hover,
.sp-filter-btn.active {
    background: var(--accent, #E67E22);
    border-color: var(--accent, #E67E22);
    color: #fff;
}

/* -- Product Grid -- */
.sp-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 992px) { .sp-products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sp-products-grid { grid-template-columns: 1fr; } }

.sp-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: 0.3s;
}
.sp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: var(--accent, #E67E22);
}
.sp-product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.sp-product-thumb {
    height: 200px;
    overflow: hidden;
    background: #f9f9f9;
}
.sp-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sp-product-info {
    padding: 20px;
}
.sp-product-info h3 {
    font-size: 16px;
    color: var(--primary, #1B2B48);
    margin-bottom: 8px;
}
.sp-product-info p {
    font-size: 13px;
    color: #636E72;
    margin: 0;
}

/* -- Pagination -- */
.sp-pagination {
    text-align: center;
    margin-top: 40px;
}
.sp-pagination a,
.sp-pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: var(--primary, #1B2B48);
    text-decoration: none;
}
.sp-pagination .current {
    background: var(--accent, #E67E22);
    color: #fff;
    border-color: var(--accent, #E67E22);
}
.sp-pagination a:hover {
    background: #f5f5f5;
}

/* -- Single Product -- */
.sp-quote-btn { margin-top: 15px; }

.sp-breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    font-size: 13px;
}
.sp-breadcrumb a { color: var(--primary, #1B2B48); text-decoration: none; }
.sp-breadcrumb .sep { color: #999; margin: 0 5px; }
.sp-breadcrumb .current { color: var(--accent, #E67E22); }

.sp-single-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
@media (max-width: 768px) {
    .sp-single-layout { grid-template-columns: 1fr; gap: 30px; }
}

.sp-main-image {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    background: #f9f9f9;
    margin-bottom: 15px;
}
.sp-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.sp-gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.sp-gallery-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}
.sp-gallery-thumbs img:hover,
.sp-gallery-thumbs img.sp-thumb-active {
    border-color: var(--accent, #E67E22);
}

.sp-single-content h1 {
    font-size: 32px;
    color: var(--primary, #1B2B48);
    margin-bottom: 15px;
}
.sp-product-intro {
    font-size: 15px;
    color: #636E72;
    line-height: 1.6;
    margin-bottom: 20px;
}
.sp-single-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.sp-single-cats a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-gray, #F8F9FA);
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary, #1B2B48);
    text-decoration: none;
    font-weight: 600;
}
.sp-single-cats a:hover {
    background: var(--accent, #E67E22);
    color: #fff;
}
.sp-single-description {
    font-size: 15px;
    line-height: 1.8;
    color: #2D3436;
}

/* -- Product Details Section (full-width below top row) -- */
.sp-single-details {
    margin-top: 50px;
    padding-top: 30px;
    padding-bottom: 10px;
    border-top: 1px solid #eee;
}
.sp-single-details .sp-single-description {
    font-size: 15px;
    line-height: 1.8;
    color: #2D3436;
}
.sp-single-details .sp-single-cats {
    margin-bottom: 20px;
}

/* -- Related Sections (Products / News) -- */
.sp-related-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e8e8e8;
}
/* Lighter border between consecutive related sections */
.sp-related-products + .sp-related-news {
    border-top-color: #f0f0f0;
    border-top-width: 1px;
    margin-top: 30px;
    padding-top: 30px;
}
.sp-related-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary, #1B2B48);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 0.5px;
    position: relative;
}
.sp-related-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent, #E67E22);
    margin: 12px auto 0;
    border-radius: 2px;
}
.sp-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.sp-related-news .sp-related-grid {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 992px) {
    .sp-related-grid,
    .sp-related-news .sp-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .sp-related-grid,
    .sp-related-news .sp-related-grid { grid-template-columns: 1fr; }
}

.sp-related-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: 0.3s;
}
.sp-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: var(--accent, #E67E22);
}
.sp-related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.sp-related-thumb {
    height: 160px;
    overflow: hidden;
    background: #f9f9f9;
}
.sp-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sp-related-card h3 {
    font-size: 14px;
    color: var(--primary, #1B2B48);
    padding: 12px 15px 8px;
    margin: 0;
}
.sp-related-date {
    display: block;
    font-size: 12px;
    color: #999;
    padding: 0 15px 12px;
}

/* -- Categories Grid (Shortcode) -- */
.sp-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 992px) { .sp-categories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sp-categories-grid { grid-template-columns: 1fr; } }

.sp-category-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: 0.3s;
    text-align: center;
}
.sp-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.sp-category-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 20px;
}
.sp-category-thumb {
    height: 140px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-category-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.sp-category-card h3 {
    font-size: 16px;
    color: var(--primary, #1B2B48);
    margin-bottom: 5px;
}
.sp-count {
    font-size: 12px;
    color: #999;
}
