* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-image: url(../uploads/fondodepagina1.png);
    color: #0f172a;
}

.category-page {
    min-height: 100vh;
    padding: 34px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.category-shell {
    width: 100%;
    max-width: 1180px;
    display: grid;
    grid-template-columns: 340px 1fr;
    background: #fff;
    border: 1px solid var(--grt-borde, #dce5dc);
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(18, 53, 45, 0.08);
    overflow: hidden;
}

.category-sidebar {
    background: #12352d;
    color: white;
    padding: 32px 28px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 13px;
    color: white;
    text-decoration: none;
    margin-bottom: 40px;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-link p {
    font-size: 15px;
    color: #d6e5ef;
    font-weight: 800;
    line-height: 1;
}

.brand-link strong {
    display: block;
    font-size: 21px;
    color: #7c7f85;
    font-weight: 900;
    line-height: 1.05;
}

.side-content {
    margin-bottom: 28px;
}

.side-label {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(49, 196, 255, 0.12);
    color: #7c7f85;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.side-content h1 {
    font-size: 39px;
    line-height: 0.98;
    font-weight: 900;
    color: white;
    margin-bottom: 16px;
}

.side-content p {
    max-width: 270px;
    font-size: 15px;
    line-height: 1.5;
    color: #d6e5ef;
    font-weight: 700;
}

.category-icon-box {
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 26px;
    text-align: center;
}

.category-title-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-title-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.category-icon-box > span {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-icon-box h3 {
    color: white;
    font-size: 23px;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-icon-box p {
    color: #d6e5ef;
    font-size: 14px;
    font-weight: 800;
}

.category-icon-box strong {
    color: #7c7f85;
}

.side-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-menu a {
    display: block;
    padding: 14px 15px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #d6e5ef;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    transition: 0.2s ease;
}

.side-menu a:hover {
    background: rgba(49, 196, 255, 0.14);
    color: white;
}

.side-menu .menu-primary {
    background: #7c7f85;
    color: #12352d;
}

.side-menu .menu-primary:hover {
    background: white;
    color: #12352d;
}

.category-main {
    background: var(--grt-papel, #f4f6f2);
    padding: 30px 34px 36px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
    padding: clamp(18px, 3vw, 32px);
    background: #e6efe2;
    border: 1px solid var(--grt-borde, #dce5dc);
    border-radius: 20px;
}

.page-label {
    display: inline-block;
    color: var(--grt-secundario, #52655a);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 4px;
}

.category-header h2 {
    font-size: clamp(24px, 4vw, 40px);
    overflow-wrap: anywhere;
    color: var(--grt-tinta, #182e25);
    font-weight: 900;
    line-height: 1.1;
}

.category-header p {
    margin-top: 8px;
    font-size: 15px;
    color: var(--grt-secundario, #52655a);
    font-weight: 800;
}

.back-btn {
    background: #fff;
    border: 1px solid var(--grt-borde, #dce5dc);
    color: #12352d;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.back-btn:hover {
    background: #f4f6f2;
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.summary-card {
    background: #fff;
    border: 1px solid var(--grt-borde, #dce5dc);
    border-radius: 16px;
    padding: 16px;
}

.summary-card span {
    display: block;
    font-size: 13px;
    color: var(--grt-secundario, #52655a);
    font-weight: 900;
    margin-bottom: 6px;
}

.summary-card strong {
    display: block;
    font-size: 24px;
    color: var(--grt-tinta, #182e25);
    font-weight: 900;
    word-break: break-word;
}

.ad-wrapper {
    margin-bottom: 18px;
}

.category-section {
    background: #fff;
    border: 1px solid var(--grt-borde, #dce5dc);
    border-radius: 20px;
    padding: 20px;
}

.section-title {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.section-title > span {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #e6efe2;
    color: var(--grt-bosque, #12352d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    flex-shrink: 0;
}

.section-title h3 {
    font-size: 23px;
    color: var(--grt-tinta, #182e25);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.section-title p {
    font-size: 14px;
    color: var(--grt-secundario, #52655a);
    font-weight: 800;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.ad-card {
    background: #fff;
    border: 1px solid var(--grt-borde, #dce5dc);
    border-radius: 18px;
    overflow: hidden;
}

.ad-image {
    position: relative;
    display: block;
    height: 190px;
    background: #e9eee7;
    text-decoration: none;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grt-secundario, #52655a);
    font-weight: 900;
}

.featured-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 900;
}

.ad-body {
    padding: 16px;
}

.ad-body h4 {
    font-size: 19px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.ad-body h4 a {
    color: var(--grt-tinta, #182e25);
    text-decoration: none;
    font-weight: 900;
}

.price {
    font-size: 23px;
    color: #12352d;
    font-weight: 900;
    margin-bottom: 8px;
}

.location,
.seller {
    font-size: 13px;
    color: var(--grt-secundario, #52655a);
    font-weight: 800;
    margin-bottom: 6px;
}

.seller strong {
    color: var(--grt-tinta, #182e25);
}

.ad-actions {
    margin-top: 14px;
}

.ad-actions a {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--grt-verde, #286347);
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
}

.ad-actions a:hover {
    background: #102d24;
}

.empty-card {
    background: #f4f6f2;
    border: 1px dashed var(--grt-borde, #dce5dc);
    border-radius: 18px;
    padding: clamp(16px, 4vw, 32px);
    text-align: center;
}

.empty-card span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e6efe2;
    color: #12352d;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 12px;
}

.empty-card h3 {
    font-size: 26px;
    color: var(--grt-tinta, #182e25);
    font-weight: 900;
    margin-bottom: 10px;
}

.empty-card p {
    color: var(--grt-secundario, #52655a);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
    margin-bottom: 16px;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-actions a {
    display: inline-block;
    background: var(--grt-verde, #286347);
    color: white;
    text-decoration: none;
    padding: 13px 20px;
    border-radius: 12px;
    font-weight: 900;
}

.empty-actions a:hover {
    background: var(--grt-verde-oscuro, #1b5038);
}

.empty-actions .secondary {
    background: #e6efe2;
    color: #12352d;
}

.empty-actions .secondary:hover {
    background: #12352d;
    color: white;
}

@media (max-width: 1000px) {
    .category-shell {
        grid-template-columns: 310px 1fr;
    }

    .category-header {
        flex-direction: column;
    }

    .summary-row {
        grid-template-columns: 1fr;
    }

    .ads-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {

    .category-page {
        padding: 15px;
    }

    .category-shell {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        display: none;
    }

    .category-main {
        padding: 25px 20px;
    }

    .category-title-with-icon {
        gap: 10px;
    }

    .category-title-icon {
        width: 36px;
        height: 36px;
    }

    .ad-image {
        height: 210px;
    }

    .category-title-icon {
        max-width: 100%;
        max-height: 100%;
    }
}

/* Publicidad */
.publicidad-box {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    padding: 16px;
    margin: 22px 0;
    box-shadow: 0 12px 32px rgba(18, 53, 45, 0.10);
}

.publicidad-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.publicidad-head span {
    background: #12352d;
    color: white;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.publicidad-head p {
    color: var(--grt-secundario, #52655a);
    font-size: 12px;
    font-weight: 900;
}

.publicidad-producto {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 15px;
    text-decoration: none;
    color: var(--grt-tinta, #182e25);
}

.publicidad-img-wrap {
    width: 170px;
    height: 130px;
    border-radius: 16px;
    overflow: hidden;
    background: #e6efe2;
}

.publicidad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.publicidad-sin-img {
    width: 100%;
    height: 100%;
    background: #12352d;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 1px;
}

.publicidad-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.publicidad-info h3 {
    color: var(--grt-tinta, #182e25);
    font-size: 22px;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 8px;
}

.publicidad-info p {
    color: var(--grt-secundario, #52655a);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;
    margin-bottom: 13px;
}

.publicidad-btn {
    width: fit-content;
    background: #12352d;
    color: white;
    padding: 11px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
}

.publicidad-producto:hover .publicidad-btn {
    background: #102d24;
}

@media (max-width: 650px) {
    .publicidad-producto {
        grid-template-columns: 1fr;
    }

    .publicidad-img-wrap {
        width: 100%;
        height: 190px;
    }

    .publicidad-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

.quitar-publicidad-link {
    color: #12352d;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    text-decoration: none;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.quitar-publicidad-link:hover {
    background: #fde68a;
}