﻿/* =============================================
       BROSUR PAGE — Toyota-style Design
       ============================================= */

    /* Hero Banner */
    .brosur-hero {
      background: linear-gradient(135deg, #0d2d5e 0%, #1a4a8a 50%, #0d2d5e 100%);
      border-radius: 20px;
      padding: 22px 20px;
      color: white;
      margin-bottom: 18px;
      box-shadow: var(--shadow-blue);
      position: relative;
      overflow: hidden;
    }

    .brosur-hero::before {
      content: '';
      position: absolute;
      top: -50px;
      right: -40px;
      width: 180px;
      height: 180px;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
      pointer-events: none;
    }

    .brosur-hero::after {
      content: '';
      position: absolute;
      bottom: -30px;
      left: -20px;
      width: 120px;
      height: 120px;
      background: radial-gradient(circle, rgba(232, 25, 44, 0.15), transparent 70%);
      pointer-events: none;
    }

    .brosur-hero-row {
      display: flex;
      align-items: center;
      gap: 14px;
      position: relative;
      z-index: 1;
    }

    .brosur-hero-icon {
      width: 50px;
      height: 50px;
      background: rgba(255, 255, 255, 0.15);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      flex-shrink: 0;
      backdrop-filter: blur(8px);
    }

    .brosur-hero h2 {
      color: white;
      font-size: 18px;
      font-weight: 800;
      margin: 0 0 3px;
      letter-spacing: -0.3px;
    }

    .brosur-hero p {
      font-size: 11px;
      opacity: 0.8;
      margin: 0;
      font-weight: 500;
      line-height: 1.4;
    }

    /* Search bar */
    .search-wrap {
      position: relative;
      margin-bottom: 12px;
    }

    .search-icon-brosur {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      font-size: 13px;
      pointer-events: none;
    }

    .search-clear {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      font-size: 13px;
      cursor: pointer;
      display: none;
      background: none;
      border: none;
      padding: 2px 4px;
      line-height: 1;
      transition: color 0.2s;
    }

    .search-clear:hover {
      color: var(--primary-red);
    }

    .search-clear.visible {
      display: block;
    }

    .brosur-search-input {
      width: 100%;
      padding: 13px 38px 13px 40px;
      border-radius: 14px;
      border: 1.5px solid var(--border-color);
      font-size: 13px;
      font-weight: 500;
      background: white;
      outline: none;
      transition: var(--transition);
      color: var(--text-dark);
      box-shadow: var(--shadow-xs);
    }

    .brosur-search-input:focus {
      border-color: var(--accent-blue);
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    }

    /* Category tabs */
    .kat-tabs {
      display: flex;
      gap: 7px;
      overflow-x: auto;
      padding-bottom: 3px;
      margin-bottom: 18px;
      scrollbar-width: none;
    }

    .kat-tabs::-webkit-scrollbar {
      display: none;
    }

    .kat-tab {
      flex-shrink: 0;
      padding: 7px 16px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      transition: var(--transition-spring);
      border: 1.5px solid var(--border-color);
      background: white;
      color: var(--text-muted);
      white-space: nowrap;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .kat-tab.active {
      background: var(--primary-red);
      color: white;
      border-color: var(--primary-red);
      box-shadow: var(--shadow-red);
    }

    .kat-tab:active {
      transform: scale(0.95);
    }

    /* Section header per kategori */
    .brosur-section {
      margin-bottom: 24px;
    }

    .brosur-section-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 4px;
      margin-bottom: 12px;
      border-bottom: 2px solid var(--primary-red);
    }

    .brosur-section-icon {
      width: 30px;
      height: 30px;
      border-radius: 9px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      color: white;
      flex-shrink: 0;
    }

    .brosur-section-title {
      font-size: 13px;
      font-weight: 900;
      color: var(--primary-red);
      letter-spacing: -0.2px;
      flex: 1;
      text-transform: uppercase;
    }

    .brosur-section-count {
      font-size: 11px;
      font-weight: 700;
      background: rgba(232, 25, 44, 0.08);
      color: var(--primary-red);
      padding: 3px 10px;
      border-radius: 999px;
    }

    /* Grid of brochure cards */
    .brosur-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    /* Brochure card */
    .brosur-card {
      background: white;
      border: 1.5px solid var(--border-color);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-xs);
      transition: var(--transition);
      animation: float-up 0.35s var(--ease-out) both;
      display: flex;
      flex-direction: column;
    }

    .brosur-card:hover {
      box-shadow: var(--shadow-md);
      border-color: rgba(13, 45, 94, 0.2);
      transform: translateY(-2px);
    }

    /* Car image area */
    .brosur-card-img-wrap {
      background: linear-gradient(145deg, #f8fafc, #f1f5f9);
      position: relative;
      overflow: hidden;
      height: 110px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .brosur-card-img-wrap img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      transition: transform 0.4s var(--ease);
    }

    .brosur-card:hover .brosur-card-img-wrap img {
      transform: scale(1.05);
    }

    .brosur-card-img-wrap .img-fallback {
      font-size: 36px;
      color: var(--text-light);
    }

    .brosur-card-img-wrap .kat-badge {
      position: absolute;
      top: 7px;
      left: 7px;
      font-size: 8px;
      font-weight: 800;
      padding: 2px 7px;
      border-radius: 999px;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    /* Card body */
    .brosur-card-body {
      padding: 10px 12px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
    }

    .brosur-card-name {
      font-size: 13px;
      font-weight: 800;
      color: var(--text-dark);
      letter-spacing: -0.2px;
      line-height: 1.2;
    }

    .brosur-card-desc {
      font-size: 10px;
      color: var(--text-muted);
      line-height: 1.4;
    }

    /* Card action buttons */
    .brosur-card-actions {
      display: flex;
      gap: 6px;
      margin-top: auto;
    }

    .btn-brosur-view {
      flex: 1;
      padding: 8px 6px;
      border-radius: 10px;
      border: 1.5px solid var(--primary-blue);
      background: transparent;
      color: var(--primary-blue);
      font-size: 10px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      transition: var(--transition);
      text-decoration: none;
    }

    .btn-brosur-view:hover {
      background: var(--primary-blue);
      color: white;
    }

    .btn-brosur-share {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      border: 1.5px solid var(--border-color);
      background: white;
      color: var(--text-muted);
      font-size: 11px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: var(--transition);
      flex-shrink: 0;
    }

    .btn-brosur-share:hover {
      border-color: var(--primary-red);
      color: var(--primary-red);
    }

    /* Skeleton loading */
    .skeleton-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .skeleton-card {
      background: white;
      border: 1.5px solid var(--border-color);
      border-radius: 16px;
      overflow: hidden;
    }

    .skeleton-img {
      height: 90px;
      background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
    }

    .skeleton-body {
      padding: 10px 12px 12px;
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .skeleton-line {
      border-radius: 6px;
      background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
    }

    @keyframes shimmer {
      0% {
        background-position: 200% 0;
      }

      100% {
        background-position: -200% 0;
      }
    }

    /* Modal PDF */
    .pdf-modal {
      display: none;
      position: fixed;
      z-index: 10000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(4px);
      justify-content: center;
      align-items: center;
    }

    .pdf-modal.active {
      display: flex;
      animation: modalFadeIn 0.3s ease-out forwards;
    }

    @keyframes modalFadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .pdf-modal-content {
      background: white;
      width: 92%;
      max-width: 900px;
      height: 85vh;
      border-radius: 16px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
      transform: translateY(10px);
      animation: modalSlideUp 0.3s ease-out forwards;
    }

    @keyframes modalSlideUp {
      from {
        transform: translateY(20px);
      }

      to {
        transform: translateY(0);
      }
    }

    .pdf-modal-header {
      padding: 16px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--border-color);
      background: #f8fafc;
    }

    .pdf-modal-title {
      font-weight: 700;
      font-size: 1.1rem;
      color: var(--text-dark);
      margin: 0;
    }

    .pdf-modal-close {
      background: none;
      border: none;
      font-size: 1.25rem;
      color: #64748b;
      cursor: pointer;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      transition: all 0.2s;
    }

    .pdf-modal-close:hover {
      background: #f1f5f9;
      color: var(--primary-red);
    }

    .pdf-modal-body {
      flex: 1;
      width: 100%;
      height: 100%;
      position: relative;
    }

    .pdf-modal-body iframe,
    .pdf-modal-body object {
      width: 100%;
      height: 100%;
      border: none;
    }

    /* Empty state */
    .brosur-empty {
      text-align: center;
      padding: 40px 20px;
      color: var(--text-muted);
    }

    .brosur-empty i {
      font-size: 40px;
      margin-bottom: 12px;
      opacity: 0.4;
    }

    .brosur-empty p {
      font-size: 13px;
      font-weight: 600;
    }

    .brosur-empty small {
      font-size: 11px;
      color: var(--text-light);
    }

    /* Result count */
    .result-count {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 600;
      margin-bottom: 14px;
    }

    /* Category color map */
    .icon-lmpv {
      background: linear-gradient(135deg, #2563eb, #1d4ed8);
    }

    .icon-suv {
      background: linear-gradient(135deg, #16a34a, #15803d);
    }

    .icon-hatchback {
      background: linear-gradient(135deg, #f59e0b, #d97706);
    }

    .icon-sedan {
      background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    }

    .icon-mpv-mewah {
      background: linear-gradient(135deg, #b91c1c, #991b1b);
    }

    .icon-commercial {
      background: linear-gradient(135deg, #0891b2, #0e7490);
    }

    .icon-electrified {
      background: linear-gradient(135deg, #10b981, #059669);
    }

    .icon-lainnya {
      background: linear-gradient(135deg, #64748b, #475569);
    }

    .badge-lmpv {
      background: rgba(37, 99, 235, 0.12);
      color: #2563eb;
    }

    .badge-suv {
      background: rgba(22, 163, 74, 0.12);
      color: #16a34a;
    }

    .badge-hatchback {
      background: rgba(245, 158, 11, 0.12);
      color: #d97706;
    }

    .badge-sedan {
      background: rgba(139, 92, 246, 0.12);
      color: #8b5cf6;
    }

    .badge-mpv-mewah {
      background: rgba(185, 28, 28, 0.12);
      color: #b91c1c;
    }

    .badge-commercial {
      background: rgba(8, 145, 178, 0.12);
      color: #0891b2;
    }

    .badge-electrified {
      background: rgba(16, 185, 129, 0.12);
      color: #059669;
    }

    .badge-lainnya {
      background: rgba(100, 116, 139, 0.12);
      color: #64748b;
    }

    /* Share toast */
    .share-toast {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--surface-1);
      color: white;
      font-size: 12px;
      font-weight: 600;
      padding: 10px 18px;
      border-radius: 999px;
      box-shadow: var(--shadow-lg);
      opacity: 0;
      pointer-events: none;
      transition: all 0.3s var(--ease);
      z-index: 9999;
      white-space: nowrap;
    }

    .share-toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    @keyframes float-up {
      from {
        opacity: 0;
        transform: translateY(12px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Responsive untuk Tablet dan Desktop */
    @media (min-width: 768px) {
      .brosur-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
      }
      .brosur-card-img-wrap {
        height: 130px;
      }
      .brosur-card-img-wrap img {
        object-fit: contain;
      }
    }

    @media (min-width: 1024px) {
      .brosur-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
      }
      .brosur-card-img-wrap {
        height: 150px;
      }
    }
