/* =========================================
   Items & Products Feature Page
   ========================================= */

:root {
    --ip-primary: #0A192F;
    --ip-primary-hover: rgb(76, 62, 221);
    --ip-bg-light: #F8FAFC;
    --ip-bg-white: #FFFFFF;
    --ip-text-main: #0F172A;
    --ip-text-muted: #475569;
    --ip-border-radius: 14px;
    --ip-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Section Header --- */
.ip-section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-inline: auto;
}

.ip-section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--ip-text-main);
}

.ip-section-header p {
    font-size: 1.15rem;
    color: var(--ip-text-muted);
}

/* --- Scroll Animation --- */
.ip-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.ip-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   EMPATHY SECTION
   ========================================= */
.ip-empathy-theme {
    background-color: var(--primary-background);
    background-image: radial-gradient(rgba(10, 25, 47, 0.05) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    color: var(--ip-text-main);
}

.ip-empathy-theme .ip-section-header h2 {
    color: var(--ip-text-main);
}

.ip-empathy-theme .ip-section-header p {
    color: var(--ip-text-muted);
}

.ip-empathy-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.ip-empathy-card {
    position: relative;
    border-radius: var(--ip-border-radius);
    overflow: hidden;
    transition: var(--ip-transition);
    box-shadow: none;
}

.ip-empathy-card:hover {
    transform: translateY(-4px);
    box-shadow: 5px 5px 0 rgba(10, 25, 47, 0.08);
}

.ip-empathy-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.ip-empathy-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 80%, transparent 100%);
}

.ip-empathy-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #ffffff;
    margin: 0 0 8px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.ip-empathy-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.ip-empathy-conclusion {
    margin-top: 48px;
    text-align: center;
    padding: 24px 32px;
    background-color: var(--primary-header-and-footer-logo);
    border: 1.5px solid #dbe2f9;
    border-radius: var(--ip-border-radius);
    box-shadow: none;
    transition: var(--ip-transition);
}

.ip-empathy-conclusion:hover {
    transform: translateY(-4px);
    box-shadow: 5px 5px 0 rgba(10, 25, 47, 0.08);
    border-color: #93a5d6;
}

.ip-empathy-conclusion p {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ip-text-main);
    margin: 0;
    line-height: 1.8;
}

/* =========================================
   BENTO GRID - Shared
   ========================================= */
.ip-bento-grid {
    display: grid;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.ip-bento-card {
    background-color: var(--primary-header-and-footer-logo);
    border: 1.5px solid #dbe2f9;
    border-radius: var(--ip-border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--ip-transition);
    box-shadow: none;
}

.ip-bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 5px 5px 0 rgba(10, 25, 47, 0.08);
    border-color: #93a5d6;
}

.ip-bento-card-content {
    padding: 32px 32px 24px;
}

.ip-bento-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.ip-bento-icon--blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.ip-bento-icon--green {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.ip-bento-icon--purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.ip-bento-icon--orange {
    background-color: rgba(255, 123, 38, 0.1);
    color: #ff7b26;
}

.ip-bento-icon--red {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.ip-bento-icon--teal {
    background-color: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.ip-bento-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ip-text-main);
    line-height: 1.4;
}

.ip-bento-card p {
    font-size: 0.95rem;
    color: var(--ip-text-muted);
    line-height: 1.7;
    margin: 0;
}

.ip-bento-card-visual {
    padding: 0 32px 32px;
    margin-top: auto;
}

/* =========================================
   BENTO GRID 1 - Warehouse & Sales
   ========================================= */
.ip-bento-grid--1 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
}

/* Stock alert: right column, row 1 */
.ip-bento-card--stock {
    grid-column: 2;
    grid-row: 1;
}

/* Left column wrapper: left column, row 1 */
.ip-bento-left-col {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ip-bento-left-col .ip-bento-card--icon-sm {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Recipe & Package stay in row 2 */
.ip-bento-grid--1 .ip-bento-card:not(.ip-bento-card--stock):not(.ip-bento-card--icon-sm) {
    grid-column: span 1;
}

/* Icon-small cards: side by side in row 2 */
.ip-bento-card--icon-sm {
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-direction: row;
}

.ip-bento-card--icon-sm .ip-bento-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.ip-bento-card--icon-sm h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.ip-bento-card--icon-sm p {
    font-size: 0.9rem;
}

/* --- Stock Alert Mock --- */
.ip-stock-alert-mock {
    background-color: var(--primary-background);
    border-radius: 14px;
    padding: 20px;
}

.ip-stock-alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ip-text-main);
}

.ip-stock-alert-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: ip-pulse 2s infinite;
}

.ip-stock-alert-dot--red {
    background-color: #ef4444;
}

@keyframes ip-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ip-stock-alert-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ip-stock-alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ip-stock-alert-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ip-text-main);
    min-width: 100px;
}

.ip-stock-alert-bar {
    flex: 1;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.ip-stock-alert-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.ip-stock-alert-fill--danger {
    background-color: #ef4444;
}

.ip-stock-alert-fill--warning {
    background-color: #f59e0b;
}

.ip-stock-alert-fill--safe {
    background-color: #22c55e;
}

.ip-stock-alert-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ip-text-muted);
    min-width: 55px;
    text-align: left;
    direction: ltr;
}

.ip-stock-alert-value--danger {
    color: #ef4444;
}

.ip-stock-alert-value--warning {
    color: #f59e0b;
}

/* --- Recipe Mock --- */
.ip-recipe-mock {
    background-color: var(--primary-background);
    border-radius: 14px;
    padding: 20px;
}

.ip-recipe-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ip-text-main);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.ip-recipe-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.ip-recipe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.ip-recipe-item span:first-child {
    color: var(--ip-text-muted);
}

.ip-recipe-item span:last-child {
    font-weight: 600;
    color: var(--ip-text-main);
    direction: ltr;
}

.ip-recipe-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
}

/* --- Package Mock --- */
.ip-package-mock {
    background-color: var(--primary-background);
    border-radius: 14px;
    padding: 4px;
}

.ip-package-item {
    background-color: var(--primary-header-and-footer-logo);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.ip-package-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ip-package-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ip-text-main);
}

.ip-package-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    background-color: #ef4444;
    padding: 4px 10px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ip-package-products {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.ip-package-products span {
    font-size: 0.85rem;
    color: var(--ip-text-muted);
}

.ip-package-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin-bottom: 14px;
}

.ip-package-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ip-package-add {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--ip-transition);
}

.ip-package-add:hover {
    background-color: #2563eb;
}

.ip-package-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.ip-package-old-price {
    font-size: 0.8rem;
    color: var(--ip-text-muted);
    text-decoration: line-through;
}

.ip-package-new-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ip-text-main);
}

/* =========================================
   BENTO GRID 2 - Speed & Data
   ========================================= */
.ip-bento2-theme {
    background-color: var(--primary-background);
    color: var(--ip-text-main);
}

.ip-bento2-theme .ip-section-header h2 {
    color: var(--ip-text-main);
}

.ip-bento2-theme .ip-section-header p {
    color: var(--ip-text-muted);
}

.ip-bento-grid--2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
}

/* Row 1: History (right) + Settings (left) */
.ip-bento-grid--2 .ip-bento-card:not(.ip-bento-card--wide) {
    grid-column: span 1;
}

/* Row 2: CSV (full width) */
.ip-bento-grid--2 .ip-bento-card--wide {
    grid-column: 1 / -1;
}

/* --- CSV Mock --- */
.ip-csv-mock {
    background-color: var(--primary-background);
    border-radius: 14px;
    padding: 20px;
    overflow: hidden;
}

.ip-csv-table {
    overflow-x: auto;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
}

.ip-csv-table::-webkit-scrollbar {
    height: 4px;
}

.ip-csv-table::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 2px;
}

.ip-csv-table::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 2px;
}

.ip-csv-row {
    display: grid;
    grid-template-columns: repeat(14, minmax(90px, 1fr));
    gap: 8px;
    padding: 10px 12px;
    font-size: 0.72rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    min-width: max-content;
}

.ip-csv-row:last-of-type {
    border-bottom: none;
}

.ip-csv-row--header {
    font-weight: 700;
    color: var(--ip-text-main);
    background-color: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    margin-bottom: 4px;
}

.ip-csv-row:not(.ip-csv-row--header) {
    color: var(--ip-text-muted);
}

.ip-csv-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    justify-content: flex-end;
}

.ip-csv-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.ip-csv-btn--import {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.ip-csv-btn--export {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* --- History Mock --- */
.ip-history-mock {
    background-color: var(--primary-background);
    border-radius: 14px;
    padding: 20px;
}

.ip-history-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ip-history-tab {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    color: var(--ip-text-muted);
    background-color: transparent;
}

.ip-history-tab--active {
    background-color: var(--ip-primary);
    color: #ffffff;
}

.ip-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ip-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ip-history-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ip-history-dot--green {
    background-color: #22c55e;
}

.ip-history-dot--red {
    background-color: #ef4444;
}

.ip-history-dot--blue {
    background-color: #3b82f6;
}

.ip-history-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ip-history-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ip-text-main);
}

.ip-history-date {
    font-size: 0.75rem;
    color: var(--ip-text-muted);
}

/* --- Settings Mock --- */
.ip-settings-mock {
    background-color: var(--primary-background);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ip-settings-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ip-settings-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ip-text-main);
}

.ip-settings-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ip-settings-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: rgba(255, 123, 38, 0.1);
    color: #ff7b26;
}

.ip-settings-tag--blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.ip-settings-tag--green {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.ip-settings-tag--purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

/* =========================================
   FINAL CTA SECTION
   ========================================= */
.ip-cta-theme {
    background-color: var(--primary-background);
    color: var(--ip-text-main);
}

.ip-cta-banner {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #0A192F 0%, #1a2f4a 100%);
    border-radius: var(--ip-border-radius);
    max-width: 900px;
    margin: 0 auto;
}

.ip-cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.5;
}

.ip-cta-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
    max-width: 600px;
    margin-inline: auto;
}

.ip-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.ip-cta-btn {
    display: inline-block;
    background-color: var(--primary-cta);
    color: #ffffff;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--ip-transition);
}

.ip-cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.ip-cta-btn--outline {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.ip-cta-btn--outline:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

/* =========================================
   CTA FORM - Disable Animations
   ========================================= */
.ip-main .cta-section,
.ip-main .cta-section.ip-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
    .ip-section-header h2 {
        font-size: 2rem;
    }

    .ip-bento-grid--1 {
        grid-template-columns: 1fr;
    }

    .ip-bento-card--stock {
        grid-column: 1;
        grid-row: auto;
    }

    .ip-bento-left-col {
        grid-column: 1;
        grid-row: auto;
    }

    .ip-bento-grid--2 {
        grid-template-columns: 1fr;
    }

    .ip-bento-grid--2 .ip-bento-card--wide {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .ip-empathy-cards {
        grid-template-columns: 1fr;
    }

    .ip-bento-card--icon-sm {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .ip-cta-banner {
        padding: 40px 24px;
    }

    .ip-cta-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .ip-section-header h2 {
        font-size: 1.6rem;
    }

    .ip-bento-card-content {
        padding: 24px 20px 20px;
    }

    .ip-bento-card-visual {
        padding: 0 20px 24px;
    }

    .ip-stock-alert-item {
        flex-wrap: wrap;
    }

    .ip-stock-alert-name {
        min-width: 80px;
    }
}
