/* ========================================
   PAPIROY — Lista de Precios Styles
   ======================================== */

/* ── PAGE HEADER ── */
.page-header {
    background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
    padding: 130px 24px 70px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.ph-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(18, 48, 18, 0.85), rgba(30, 80, 30, 0.75)),
        url('../img/precios-bg.webp') center/cover no-repeat;
}

.ph-content {
    position: relative;
    z-index: 1;
}

.ph-content h1 {
    color: var(--white);
    margin: 12px 0;
}

.ph-content p {
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ── PRICE SECTION ── */
.price-section {
    padding: 60px 24px 90px;
    background: var(--gray-100);
}

/* Controls / search bar */
.table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.table-search {
    flex-grow: 1;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-100);
    padding: 10px 16px;
    border-radius: 50px;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    border-color: var(--green-dark);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(26, 58, 26, 0.05);
}

.search-icon {
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--green-main);
}

.table-search input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ── CATEGORY BLOCK ── */
.price-category {
    margin-bottom: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.price-cat-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    color: var(--white);
}

.price-cat-header.fungicidas {
    background: linear-gradient(135deg, #14391a, #256130);
}

.price-cat-header.herbicidas {
    background: linear-gradient(135deg, #3b2800, #7a5000);
}

.price-cat-header.insecticidas {
    background: linear-gradient(135deg, #0e2044, #1c3e80);
}

.price-cat-header.fertilizantes {
    background: linear-gradient(135deg, #003d3d, #006060);
}

.price-cat-header.bioestimulantes {
    background: linear-gradient(135deg, #30145a, #5c2898);
}

.price-cat-header.coadyuvantes {
    background: linear-gradient(135deg, #2c3333, #3f4e4f);
}

.price-cat-header.nutricionales {
    background: linear-gradient(135deg, #4c3575, #7858a6);
}

.cat-icon {
    font-size: 2rem;
    line-height: 1;
}

.cat-info h2 {
    color: var(--white);
    font-size: 1.1rem;
    margin: 0 0 3px;
    font-weight: 700;
}

.cat-info span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.cat-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── PRICE TABLE ── */
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.price-table thead th {
    padding: 12px 24px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
}

.price-table thead th:first-child {
    width: 40%;
}

.price-table thead th:nth-child(2) {
    width: 40%;
    text-align: center;
}

.price-table thead th:last-child {
    width: 20%;
    text-align: right;
}

.price-table thead th.right {
    text-align: right;
}

.price-table tbody tr {
    border-bottom: 1px solid var(--gray-200);
}

.price-table tbody tr:last-child {
    border-bottom: none;
}

.price-table tbody tr:hover {
    background: rgba(76, 187, 76, 0.04);
}

.price-table td {
    padding: 13px 24px;
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Product name cell (spans rows) */
.prod-cell {
    font-weight: 600;
    color: var(--text-primary);
    vertical-align: top;
    padding-top: 18px !important;
    min-width: 200px;
}

.prod-cell small {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.present-cell {
    color: var(--text-secondary);
    font-size: 0.86rem;
    text-align: center;
    width: 40%;
}

.price-cell {
    text-align: right;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--green-main);
}

/* Thin separator between products */
.product-sep td {
    padding: 0 !important;
    height: 2px;
    background: var(--gray-100);
    border: none !important;
}

/* Bottom note */
.price-footnote {
    text-align: center;
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin-top: 36px;
    line-height: 1.6;
}

.price-footnote a {
    color: var(--green-main);
    text-decoration: underline;
}

/* ── RESPONSIVE ── */
/* ── TABLE ROW EXPANSION ── */
.prod-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon-box {
    color: var(--green-main);
    background: var(--green-light);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s ease;
    animation: pulseIndicator 2.5s infinite;
}

@keyframes pulseIndicator {
    0% {
        box-shadow: 0 0 0 0 rgba(58, 140, 58, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(58, 140, 58, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(58, 140, 58, 0);
    }
}

/* Desktop: contenido visible — sin cursor ni icono de info */
.price-table tr {
    cursor: default;
}

/* Icono de info: solo visible en mobile */
.info-icon-box {
    display: none;
}

.price-table tr.expanded .info-icon-box {
    background: var(--green-dark);
    color: var(--white);
    animation: none;
}

.details-row {
    background: var(--gray-100);
}

.details-content {
    padding: 15px 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.details-content p {
    margin-bottom: 8px;
}

.details-content p:last-child {
    margin-bottom: 0;
}

.desktop-only {
    display: table-cell;
}

@media (max-width: 768px) {

    /* En mobile: activar ícono de info y cursor de click */
    .info-icon-box {
        display: flex;
    }

    .price-table tr {
        cursor: pointer;
    }

    .desktop-only {
        display: none !important;
    }

    .price-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-cat-header {
        padding: 16px 18px;
        gap: 12px;
    }

    .cat-count {
        display: none;
    }

    .price-table thead th,
    .price-table td {
        padding: 10px 14px;
    }

    .prod-cell small {
        display: none;
    }

    .price-table thead th:nth-child(2),
    .price-table td:nth-child(2),
    .price-table thead th:nth-child(3),
    .price-table td:nth-child(3) {
        display: none;
    }

    .price-table th,
    .price-table td {
        padding: 12px 10px;
    }

    .prod-cell {
        font-size: 0.85rem;
        max-width: 180px;
    }

    .price-cell {
        font-size: 0.95rem;
        white-space: nowrap;
        font-weight: 800;
        width: 100px;
    }
}

/* ── PRINT HEADER (Visible on screen and for printing) ── */
.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--green-dark);
    padding-bottom: 15px;
}

.print-header img {
    height: 70px;
    width: auto;
}

.ph-text {
    text-align: right;
}

.ph-text h2 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--green-dark);
    line-height: 1.2;
}

.ph-text p {
    font-size: 0.95rem;
    color: #666;
    margin-top: 4px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .page-header {
        padding: 90px 20px 40px;
    }

    .ph-content h1 {
        font-size: 1.8rem;
    }

    .ph-content p {
        font-size: 0.95rem;
    }

    .price-section {
        padding: 30px 16px 60px;
    }

    .print-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding-bottom: 20px;
    }

    .ph-text {
        text-align: center;
    }

    .ph-text h2 {
        font-size: 1.35rem;
        white-space: nowrap;
    }

    .table-controls {
        flex-direction: column;
        padding: 15px;
        gap: 12px;
    }

    .table-actions {
        width: 100%;
    }

    .table-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* ── SKELETON LOADER ── */
.skeleton-container {
    padding: 20px 0;
    width: 100%;
}

.skeleton-cat {
    width: 100%;
    height: 70px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: #eef2ea;
    margin-bottom: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-row {
    width: 100%;
    height: 55px;
    background: #ffffff;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.skeleton-cat::after,
.skeleton-row::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
    transform: translateX(-100%);
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ── PRINT ── */
@media print {

    .navbar,
    footer,
    .whatsapp-fab,
    .price-actions,
    .no-print {
        display: none !important;
    }

    .print-header {
        display: flex !important;
    }

    body {
        background: white !important;
    }

    .price-section {
        background: white !important;
        padding: 20px 0;
    }

    .page-header {
        padding: 30px 24px;
        background: #1a3a1a !important;
    }

    .page-header * {
        color: white !important;
    }

    .price-cat-header {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .price-category {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}