/* ==========================================================================
   RaiDana - catalog (product detail + document lists)
   Loaded on document pages only. Every rule is scoped to a wrapper class, so
   the home page (which also renders _Product) keeps its previous look.
   ========================================================================== */

/* ---------------------------------------------------------------- product */
.rd-product-page {
    --rd-blue: #00349a;
    --rd-blue-dark: #0b1a44;
    --rd-orange: #ff8a00;
    --rd-line: #e4e9f2;
    --rd-text: #22304d;
    --rd-muted: #5b6b88;
    --rd-soft: #f5f8ff;
}

.rd-product-page .product-detail {
    text-align: right;
    padding-top: 14px;
}

/* two columns: gallery (right in RTL) + info */
.rd-product-page .product-detail > .row:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    margin: 0 0 28px;
}

.rd-product-page .product-detail > .row:first-child > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
    padding: 0;
}

.rd-product-page .product-detail h1 {
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    font-weight: 800;
    line-height: 1.7;
    color: var(--rd-blue-dark);
    margin: 0 0 8px;
    text-align: right;
}

.rd-product-page .product-detail h5 {
    font-size: 14px;
    color: var(--rd-muted);
    margin: 0 0 16px;
    text-align: right;
}

.rd-product-page .product-detail hr {
    border: 0;
    border-top: 1px solid var(--rd-line);
    margin: 18px 0;
}

.rd-product-page .product-detail p {
    font-size: 15px;
    line-height: 2.05;
    color: var(--rd-text);
    margin-bottom: 16px;
}

/* ---- gallery ---- */
.rd-product-page #carousel-thumb {
    background: #fff;
    border: 1px solid var(--rd-line);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 2px 4px rgba(11, 26, 68, .04), 0 18px 40px rgba(11, 26, 68, .06);
}

.rd-product-page #carousel-thumb .carousel-inner {
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eef2f9;
}

.rd-product-page #carousel-thumb .carousel-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    padding: 10px;
}

.rd-product-page #carousel-thumb .carousel-item img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

/* thumbnails: a normal row under the main image, not overlaid */
.rd-product-page #carousel-thumb .carousel-indicators {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    justify-content: flex-start;
}

.rd-product-page #carousel-thumb .carousel-indicators li {
    width: 60px;
    height: 60px;
    border: 1px solid var(--rd-line);
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    opacity: 1;
}

.rd-product-page #carousel-thumb .carousel-indicators li.active {
    border-color: var(--rd-blue);
    box-shadow: 0 0 0 2px rgba(0, 52, 154, .15);
}

.rd-product-page #carousel-thumb .carousel-indicators li img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rd-product-page #carousel-thumb .carousel-control-prev,
.rd-product-page #carousel-thumb .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 46%;
    background: rgba(11, 26, 68, .55);
    border-radius: 50%;
    opacity: 0;
    transition: opacity .2s;
}

.rd-product-page #carousel-thumb:hover .carousel-control-prev,
.rd-product-page #carousel-thumb:hover .carousel-control-next { opacity: 1; }

/* ---- price + buy ---- */
.rd-product-page .product-detail .row.mt-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    background: var(--rd-soft);
    border: 1px solid var(--rd-line);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 22px 0 0 !important;
    align-items: center;
}

.rd-product-page .product-detail .row.mt-2 > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
    padding: 0;
    text-align: right;
}

.rd-product-page .product-detail .row.mt-2 > [class*="col-"]:last-child {
    min-width: 140px;
}

.rd-product-page .product-detail .tangerine.fs19 {
    font-size: 17px;
    color: var(--rd-blue-dark) !important;
}

.rd-product-page .product-detail .btn.bg-darkish-blue {
    border-radius: 10px;
    background: var(--rd-blue) !important;
    padding: 10px 22px;
    font-weight: 700;
    border: 0;
}

.rd-product-page .product-detail .btn.bg-darkish-blue:hover {
    background: var(--rd-blue-dark) !important;
}

.rd-product-page .product-detail .alert-success {
    border: 1px solid #d6efdf;
    background: #f2fbf5;
    color: #1b6b3a;
    border-radius: 12px;
    font-size: 14px;
}

/* ---- specs ---- */
.rd-product-page .cover-tab-content {
    margin-top: 28px;
    background: #fff;
    border: 1px solid var(--rd-line);
    border-radius: 16px;
    padding: 16px 18px 18px;
}

.rd-product-page .cover-tab-content .fs15.font-weight-bold {
    font-size: 15px;
    color: var(--rd-blue-dark);
}

.rd-product-page .cover-tab-content .nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--rd-line);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.rd-product-page .cover-tab-content .nav-pills .nav-link {
    border: 1px solid var(--rd-line);
    border-radius: 10px;
    color: var(--rd-text);
    font-size: 14px;
    font-weight: 700;
    padding: 7px 16px;
    background: var(--rd-soft);
}

.rd-product-page .cover-tab-content .nav-pills .nav-link.active {
    background: var(--rd-blue);
    border-color: var(--rd-blue);
    color: #fff;
}

.rd-product-page .cover-tab-content .table {
    margin-bottom: 0;
    font-size: 14px;
}

.rd-product-page .cover-tab-content .table td {
    border-color: var(--rd-line);
    padding: 10px 12px;
    vertical-align: middle;
    color: var(--rd-text);
}

.rd-product-page .cover-tab-content .table td:first-child {
    color: var(--rd-muted);
    width: 28%;
}

.rd-product-page .cover-tab-content .table-striped tbody tr:nth-of-type(odd) {
    background: #f9fbff;
}

/* ---- description ---- */
.rd-product-page .parent-product-detail-desc {
    margin-top: 34px;
}

.rd-product-page .parent-product-detail-desc > h5 {
    font-size: 17px;
    font-weight: 800;
    color: var(--rd-blue-dark);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rd-line);
}

.rd-product-page .product-detail-desc {
    background: #fff;
    border: 1px solid var(--rd-line);
    border-radius: 18px;
    padding: 26px;
    font-size: 15px;
    line-height: 2.05;
    color: var(--rd-text);
}

.rd-product-page .product-detail-desc h1,
.rd-product-page .product-detail-desc h2,
.rd-product-page .product-detail-desc h3,
.rd-product-page .product-detail-desc h4 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rd-blue-dark);
    line-height: 1.7;
    margin: 30px 0 12px;
    padding-inline-start: 12px;
    border-inline-start: 4px solid var(--rd-blue);
}

.rd-product-page .product-detail-desc h1 { font-size: 1.5rem; }
.rd-product-page .product-detail-desc h3 { border-inline-start-color: var(--rd-orange); }

.rd-product-page .product-detail-desc p,
.rd-product-page .product-detail-desc li {
    font-size: 15px;
    line-height: 2.05;
    color: var(--rd-text);
}

.rd-product-page .product-detail-desc ul,
.rd-product-page .product-detail-desc ol {
    padding-inline-start: 22px;
    margin-bottom: 18px;
}

.rd-product-page .product-detail-desc li { margin-bottom: 7px; }

.rd-product-page .product-detail-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.rd-product-page .product-detail-desc table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.rd-product-page .product-detail-desc th,
.rd-product-page .product-detail-desc td {
    border: 1px solid var(--rd-line);
    padding: 10px 12px;
    line-height: 1.9;
}

.rd-product-page .product-detail-desc th {
    background: var(--rd-soft);
    color: var(--rd-blue-dark);
    font-weight: 800;
}

.rd-product-page .product-detail-desc a {
    color: #0b5fbf;
    text-decoration: none;
    border-bottom: 1px solid rgba(11, 95, 191, .25);
}

.rd-product-page .product-detail-desc a:hover {
    color: var(--rd-orange);
    border-bottom-color: rgba(255, 138, 0, .5);
}

/* ---- related products ---- */
.rd-product-page .otherproduct {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rd-blue-dark);
    margin: 46px 0 0;
}

.rd-product-page .otherproduct .hr-over {
    margin: 10px auto 22px;
}

.rd-product-page .row-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.rd-product-page .row-products > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
}

.rd-product-page .row-products .products {
    background: #fff;
    border: 1px solid var(--rd-line);
    border-radius: 14px;
    padding: 12px;
    transition: box-shadow .2s, transform .2s;
}

.rd-product-page .row-products .products:hover {
    box-shadow: 0 12px 26px rgba(11, 26, 68, .1);
    transform: translateY(-3px);
}

.rd-product-page .row-products .products img {
    width: 100%;
    height: 150px;
    object-fit: contain;
}

.rd-product-page .row-products h5 {
    font-size: 14px;
    margin: 12px 0 0;
    line-height: 1.8;
    color: var(--rd-text);
}

.rd-product-page .row-products h5 a { color: inherit; }

@media (max-width: 991.98px) {
    .rd-product-page .product-detail > .row:first-child {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .rd-product-page #carousel-thumb .carousel-item a { height: 300px; }

    .rd-product-page .row-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .rd-product-page .product-detail .row.mt-2 { padding: 12px; }

    .rd-product-page .product-detail-desc { padding: 18px 16px; }
}

/* ------------------------------------------------------- document lists */
.rd-list {
    --rd-blue: #00349a;
    --rd-blue-dark: #0b1a44;
    --rd-orange: #ff8a00;
    --rd-line: #e4e9f2;
    --rd-muted: #5b6b88;
    padding: 28px 0 10px;
}

.rd-list__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.rd-list__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--rd-blue-dark);
    margin: 0;
    position: relative;
    padding-bottom: 10px;
}

.rd-list__title:after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 64px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--rd-blue) 70%, var(--rd-orange) 70%);
}

.rd-list__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.rd-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--rd-line);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    height: 100%;
}

.rd-card:hover {
    box-shadow: 0 16px 34px rgba(11, 26, 68, .1);
    transform: translateY(-3px);
    border-color: #d6e0f2;
}

.rd-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    background: #f3f6fb center/cover no-repeat;
}

.rd-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rd-card__title {
    font-size: 15.5px;
    font-weight: 800;
    line-height: 1.8;
    color: var(--rd-blue-dark);
    margin: 0 0 8px;
}

.rd-card__title a { color: inherit; }

.rd-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: var(--rd-muted);
    margin-bottom: 10px;
}

.rd-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rd-card__excerpt {
    font-size: 13.5px;
    line-height: 1.95;
    color: #4a5a78;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rd-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 30px 0 10px;
}

.rd-pager .btn {
    border-radius: 10px;
    border: 1px solid var(--rd-line);
    background: #fff;
    color: var(--rd-blue-dark);
    font-size: 13.5px;
    font-weight: 700;
    padding: 7px 14px;
    box-shadow: none;
}

.rd-pager .btn:hover:not(:disabled) {
    border-color: var(--rd-blue);
    color: var(--rd-blue);
}

.rd-pager .btn:disabled {
    background: var(--rd-blue);
    border-color: var(--rd-blue);
    color: #fff;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .rd-list__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .rd-list__grid { grid-template-columns: minmax(0, 1fr); }
    .rd-list { padding-top: 18px; }
}
