/* ==========================================================================
   Royal Manufacture — Reusable Components (Footer, Product Cards, Search, Modals)
   ========================================================================== */

/* 5-Column Footer matching Footer 1 [6] */
.rm-footer-wrap {
    background-color: #ffffff;
    border-top: 1px solid #ebebeb;
    padding-top: 110px;
    padding-bottom: 56px;
}

.rm-footer-container {
    padding-left: 100px;
    padding-right: 100px;
}

@media (min-width: 1200px) {
    .col-xl-20pct {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

.rm-footer-logo {
    margin-top: 6px;
    margin-bottom: 32px;
}

.rm-footer-logo img {
    max-height: 48px;
}

.rm-footer-copy,
.rm-footer-wrap p,
.rm-footer-menu a {
    color: #a1a1a1;
}

.rm-footer-wrap .heading-color,
.rm-footer-phone {
    color: #363636;
    text-decoration: none;
}

.rm-footer-phone:hover {
    color: var(--rm-accent);
}

.rm-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rm-footer-menu li {
    margin-bottom: 8px;
}

.rm-footer-menu a {
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rm-footer-menu a:hover {
    color: #000000;
}

/* Newsletter Form matching g5plus-mailchimp */
.rm-mailchimp-field {
    position: relative;
    border-bottom: 1px solid #ebebeb;
}

.rm-mailchimp-field .form-control {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 10px 36px 10px 0;
    font-size: 14px;
    color: #363636;
    box-shadow: none;
}

.rm-mailchimp-field .btn-1 {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #000000;
    padding: 4px 6px;
}

.rm-newsletter-feedback {
    font-size: 13px;
    margin-top: 8px;
}

.rm-newsletter-feedback.is-success { color: #2e7d32; }
.rm-newsletter-feedback.is-error { color: #c62828; }

.gf-social-icon-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
    align-items: center;
}

.gf-social-icon-list a {
    color: #363636;
    font-size: 16px;
    transition: color 0.2s ease;
}

.gf-social-icon-list a:hover {
    color: var(--rm-accent);
}

/* Product Cards (product-skin-01) */
.product-item-wrap {
    margin-bottom: 36px;
}

.product-item-inner {
    position: relative;
    background: #ffffff;
}

.product-thumb {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 320 / 420;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb-link {
    width: 100%;
    height: 100%;
}

.product-images-hover {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-thumb-primary,
.product-thumb-secondary {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb-primary img,
.product-thumb-secondary img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    transition: transform 0.45s ease, opacity 0.35s ease;
}

.product-thumb-secondary {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.product-item-wrap:hover .product-thumb-secondary {
    opacity: 1;
}

.product-item-wrap:hover .product-thumb-primary img {
    transform: scale(1.04);
}

.product-flash-wrap {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

.product-flash {
    display: inline-block;
    padding: 3px 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    background: #000000;
}

.product-flash.onnew {
    background: var(--rm-accent);
}

.product-flash.onfeatured {
    background: var(--rm-accent-secondary);
}

.product-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    bottom: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(12px, 0, 0);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s ease;
    z-index: 6;
}

.product-item-wrap:hover .product-actions,
.product-item-wrap:focus-within .product-actions {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
}

.product-action-item {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    opacity: 0;
    transform: translate3d(8px, 0, 0) scale(0.92);
    transition: background-color 0.22s ease,
                color 0.22s ease,
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                box-shadow 0.22s ease;
}

.product-item-wrap:hover .product-action-item,
.product-item-wrap:focus-within .product-action-item {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.product-item-wrap:hover .product-action-item:nth-child(1) { transition-delay: 0.03s; }
.product-item-wrap:hover .product-action-item:nth-child(2) { transition-delay: 0.08s; }
.product-item-wrap:hover .product-action-item:nth-child(3) { transition-delay: 0.13s; }

.product-action-item:hover {
    background: var(--rm-accent);
    color: #ffffff;
    transform: translate3d(0, -2px, 0) scale(1.06);
    box-shadow: 0 8px 18px rgba(242, 108, 79, 0.28);
}

.product-info {
    padding-top: 16px;
}

.product-cat a {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a1a1a1;
    text-decoration: none;
}

.product-cat a:hover {
    color: var(--rm-accent);
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 6px 0 4px;
    line-height: 1.4;
}

.product-title a {
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: var(--rm-accent);
}

.rm-product-spec-chip {
    font-size: 13px;
    color: #888888;
}

.product-list-actions {
    display: none;
    margin-top: 14px;
}

/* List View Mode */
.layout-list .rm-product-col {
    flex: 0 0 100%;
    max-width: 100%;
}

.layout-list .product-item-inner {
    display: flex;
    gap: 30px;
    align-items: center;
    border-bottom: 1px solid var(--rm-border);
    padding-bottom: 24px;
}

.layout-list .product-thumb {
    width: 240px;
    flex-shrink: 0;
}

.layout-list .product-list-actions {
    display: block;
}

/* Search Popup (Harmonized with Hebes mfp-move-from-top & live result panel) */
.search-popup-wrap {
    max-width: 780px;
    width: 92%;
    margin: 60px auto;
    background: #ffffff;
    padding: 40px;
    position: relative;
    height: auto;
    display: block;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.24);
}

.search-popup-form {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
    gap: 14px;
    color: #000000;
}

.search-popup-form .categories {
    position: relative;
    min-width: 165px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #000000;
    border-right: 1px solid var(--rm-border);
    padding-right: 14px;
}

.search-popup-form .categories > span {
    height: auto;
    line-height: 1.5;
    padding: 4px 22px 4px 0;
}

.search-popup-form .categories > span::after {
    content: "\f107";
    font-family: "Font Awesome 5 Pro";
    font-weight: 400;
    margin-left: 8px;
}

.search-category-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--rm-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 8px 0 0;
    padding: 8px 0;
    z-index: 30;
}

.search-category-dropdown li span {
    display: block;
    padding: 7px 14px;
    font-size: 13px;
    color: #555555;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.search-category-dropdown li span:hover {
    background: #f5f5f5;
    color: var(--rm-accent);
}

input[type="search"].search-popup-field {
    flex: 1;
    border: none !important;
    outline: none;
    font-size: 18px;
    height: 44px;
    font-family: 'Montserrat', sans-serif;
    padding: 6px 0;
    color: #000000;
    background: transparent;
}

input[type="search"].search-popup-field::placeholder {
    color: #999999;
}

.search-popup-button {
    position: static;
    width: 42px;
    height: 42px;
    margin: 0;
    background: none;
    border: none;
    font-size: 20px;
    color: #000000;
    cursor: pointer;
    transition: transform 0.25s ease, color 0.2s ease;
}

.search-popup-button i {
    color: #000000;
}

.search-popup-button:hover {
    transform: translateX(3px);
}

.search-popup-button:hover i {
    color: var(--rm-accent);
}

.search-popup-result {
    position: static;
    margin-top: 16px;
    max-height: 360px;
    overflow-y: auto;
    border-top: none;
    border-bottom: none;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 12px, 0);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}

.search-popup-result.in {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
}

.search-popup-result:empty {
    display: none;
}

.rm-live-search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #000000;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.rm-live-search-item:hover {
    background: #fafafa;
    transform: translate3d(4px, 0, 0);
    color: var(--rm-accent);
}

.rm-live-search-item img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.search-popup-keywords {
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #888888;
}

.search-popup-keywords a {
    color: #000000;
    margin-left: 6px;
    text-decoration: underline;
}

/* Quick View Modal */
.rm-quick-view-wrap {
    max-width: 900px;
    margin: 30px auto;
    background: #ffffff;
    padding: 36px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

/* Back to Top (Unified smooth GPU slide-in) */
.back-to-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(80px, 0, 0);
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, visibility 0.35s ease;
    z-index: 900;
    text-decoration: none;
}

.back-to-top i {
    position: static;
    top: auto;
    font-size: 20px;
}

.back-to-top.in {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
}

.back-to-top:hover {
    background: var(--rm-accent);
    color: #ffffff;
    transform: translate3d(0, -3px, 0);
}
