@extends('adminlte.layouts.app')

@section('content')
<div class="content-wrapper">

    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-3">
                <div class="col-sm-6">
                    <h1 class="m-0 fw-bold text-gradient-primary">
                        <i class="fas fa-book me-2"></i>Detail Buku
                    </h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item">
                            <a href="{{ route('buku.index') }}">Buku</a>
                        </li>
                        <li class="breadcrumb-item active">Detail</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>

    <section class="content">
        <div class="container-fluid">

            <div class="card shadow-xl rounded-3 border-0">
                <div class="card-header bg-gradient-primary text-white py-3 px-4">
                    <h3 class="card-title m-0 fw-semibold">
                        <i class="fas fa-info-circle me-1"></i> Informasi Buku
                    </h3>
                </div>

                <div class="card-body px-4 py-4">

                    <table class="table table-bordered table-striped shadow-sm">
                        <tr>
                            <th width="30%">Judul Buku</th>
                            <td>{{ $buku->judul }}</td>
                        </tr>
                        <tr>
                            <th>Pengarang</th>
                            <td>{{ $buku->pengarang }}</td>
                        </tr>
                        <tr>
                            <th>Penerbit</th>
                            <td>{{ $buku->penerbit }}</td>
                        </tr>
                        <tr>
                            <th>Tahun Terbit</th>
                            <td>{{ $buku->tahun_terbit }}</td>
                        </tr>
                        <tr>
                            <th>ISBN</th>
                            <td>{{ $buku->isbn }}</td>
                        </tr>
                        <tr>
                            <th>Kategori</th>
                            <td>
                                <span class="badge bg-info">
                                    {{ $buku->kategori }}
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <th>Jumlah Buku</th>
                            <td>
                                <span class="badge bg-success">
                                    {{ $buku->jumlah }}
                                </span>
                            </td>
                        </tr>
                    </table>

                    <div class="d-flex justify-content-between mt-4">
                        <a href="{{ route('buku.index') }}"
                           class="btn btn-secondary shadow-sm hover-scale">
                            <i class="fas fa-arrow-left me-1"></i> Kembali
                        </a>

                        <a href="{{ route('buku.edit', $buku->id) }}"
                           class="btn btn-warning shadow-sm hover-scale">
                            <i class="fas fa-edit me-1"></i> Edit
                        </a>
                    </div>

                </div>
            </div>

        </div>
    </section>
</div>

<style>
.text-gradient-primary {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hover-scale {
    transition: 0.2s;
}
.hover-scale:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
</style>
@endsection
