.pdfev-embed-viewer {
  margin: 0 auto;

  .archive-ebook-style {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;

    .grid-item {
        background-color: var(--pdfev-white);
        border-radius: 6px;
        overflow: visible;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);;
        display: flex;
        flex-direction: column;
        padding:10px;

        .image {
            width: 170px;
            height: 230px;
            perspective: 1500px;
            position: relative;
            cursor: pointer;
        }

        .book{
            width: 100%;
            height: 100%;
            position: relative;
            transform-style: preserve-3d;
            transform-origin: left center;
            transition: transform 0.8s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
            border-radius: 6px;
            overflow: visible;
            z-index: 2;
        }

        .front-cover {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            backface-visibility: hidden;
            border-radius: 6px;
            box-shadow: 4px 0 15px rgba(0,0,0,0.3);
            z-index: 2;
        }

        .front-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 6px;
            display: block;
        }

        .pages {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            padding: 10px;
            box-sizing: border-box;
            // background: repeating-linear-gradient(#f9f9f9, #f9f9f9 10px, #eee 10px, #eee 11px);
            background: #f9ecd9;
            z-index: 1;
            border-radius: 6px;
            box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
            text-align: center;
            h2{
                padding-top: 50px;
                font-size: 20px;
                font-weight: bold;
                color: #000;
            }
        }


        /* Hover flipping */
        .image:hover .book {
            transform: rotateY(-80deg);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
        }
        .back-cover {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            background: #222;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
            border-radius: 6px;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
        }

      .content {
        padding:5px 0;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        h2 {
          font-size: 16px;
          margin: 12px 0;
          line-height: 1.4;

          a {
            color: var(--pdfev-dark);
            text-decoration: none;
          }
        }

        .action {
          display: flex;
          gap: 0;
          flex-wrap: wrap;

          button {
            background-color: var(--pdfev-primary);
            border: none;
            color: white;
            padding: 8px 14px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 6px;

            &.read-btn::before {
              content: "👁️";
            }

            &.download-btn::before {
              content: "⬇️";
            }
          }
        }
      }
    }
  }
}