/* =============================================
   Randmarkings Customization CSS
   ============================================= */

/* --- Category Page: Center title --- */
.catalog-category-view .page-title-wrapper {
    text-align: center;
}
.catalog-category-view .page-title {
    display: block;
    text-align: center;
    width: 100%;
}

/* --- Category Page: Description centered --- */
.catalog-category-view .category-description {
    max-width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* --- Keyrings Subcategory Buttons --- */
.rm-subcat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 24px 0 32px;
}
.rm-subcat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #FFFFFF;
    border: 2px solid #E5E5E5;
    border-radius: 10px;
    color: #171717;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
}
.rm-subcat-btn:hover {
    border-color: #0D9488;
    color: #0D9488;
    background: #F0FDFA;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}
.rm-subcat-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .rm-subcat-buttons {
        gap: 8px;
    }
    .rm-subcat-btn {
        padding: 10px 20px;
        font-size: 13px;
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }
}

/* --- Product Page: Reduce empty space below main image --- */
.catalog-product-view .product.media {
    margin-bottom: 0;
    padding-bottom: 0;
}
.catalog-product-view .gallery-placeholder {
    margin-bottom: 0;
}
.catalog-product-view .product-info-main {
    padding-top: 0;
}
.catalog-product-view .product.info.detailed {
    margin-top: 16px;
}

/* --- Product Page: Trust & Help Block below media --- */
.rm-pdp-trust {
    margin-top: 24px;
}
/* Desktop: show in media column, hide mobile version */
.rm-pdp-trust-mobile {
    display: none;
}
@media (max-width: 768px) {
    .rm-pdp-trust-desktop {
        display: none;
    }
    .rm-pdp-trust-mobile {
        display: block;
        margin-bottom: 16px;
    }
    .rm-pdp-trust {
        margin-top: 16px;
    }
    .rm-pdp-trust-grid {
        display: flex !important;
        grid-template-columns: none !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 10px;
        scrollbar-width: thin;
        scrollbar-color: #0D9488 #E5E5E5;
    }
    .rm-pdp-trust-grid::-webkit-scrollbar {
        height: 5px;
    }
    .rm-pdp-trust-grid::-webkit-scrollbar-track {
        background: #E5E5E5;
        border-radius: 3px;
    }
    .rm-pdp-trust-grid::-webkit-scrollbar-thumb {
        background: #0D9488;
        border-radius: 3px;
    }
    .rm-pdp-trust-item {
        flex: 0 0 calc(100% - 40px);
        min-width: 0;
        scroll-snap-align: center;
        flex-direction: row;
        align-items: center;
        padding: 16px;
        gap: 12px;
    }
    .rm-pdp-trust-text strong {
        font-size: 14px;
    }
    .rm-pdp-trust-text span {
        font-size: 12px;
    }
    .rm-pdp-help {
        padding: 14px;
        gap: 10px;
    }
    .rm-pdp-help-body strong {
        font-size: 14px;
    }
    .rm-pdp-help-body p {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .rm-pdp-help-actions {
        gap: 6px;
    }
    .rm-pdp-help-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    .rm-pdp-steps {
        margin-top: 12px;
        padding: 14px;
    }
    .rm-pdp-steps-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    .rm-pdp-steps-list {
        gap: 8px;
    }
    .rm-pdp-step-num {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    .rm-pdp-step-info strong {
        font-size: 12px;
    }
    .rm-pdp-step-info span {
        font-size: 11px;
    }
    .rm-pdp-highlight {
        margin-top: 12px;
        padding: 14px;
    }
    .rm-pdp-highlight strong {
        font-size: 13px;
    }
    .rm-pdp-highlight span {
        font-size: 11px;
    }
}
.rm-pdp-trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.rm-pdp-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #F9FAFB;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
}
.rm-pdp-trust-icon {
    width: 36px;
    height: 36px;
    background: #F0FDFA;
    border: 1px solid #E0F2F1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rm-pdp-trust-icon svg {
    width: 18px;
    height: 18px;
    color: #0D9488;
}
.rm-pdp-trust-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 2px;
}
.rm-pdp-trust-text span {
    font-size: 12px;
    color: #737373;
    line-height: 1.4;
}
.rm-pdp-help {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, #F0FDFA 0%, #E0F2FE 100%);
    border: 1px solid #CCFBF1;
    border-radius: 14px;
}
.rm-pdp-help-icon {
    width: 42px;
    height: 42px;
    background: #0D9488;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rm-pdp-help-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}
.rm-pdp-help-body strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 4px;
}
.rm-pdp-help-body p {
    font-size: 13px;
    color: #525252;
    margin: 0 0 12px;
    line-height: 1.5;
}
.rm-pdp-help-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.rm-pdp-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.rm-pdp-help-btn--phone {
    background: #0D9488;
    color: #fff;
}
.rm-pdp-help-btn--phone:hover {
    background: #0F766E;
    color: #fff;
}
.rm-pdp-help-btn--email {
    background: #fff;
    color: #0D9488;
    border: 1.5px solid #0D9488;
}
.rm-pdp-help-btn--email:hover {
    background: #F0FDFA;
    color: #0D9488;
}
.rm-pdp-help-btn--whatsapp {
    background: #25D366;
    color: #fff;
}
.rm-pdp-help-btn--whatsapp:hover {
    background: #1DA851;
    color: #fff;
}
/* How to Order Steps */
.rm-pdp-steps {
    margin-top: 16px;
    padding: 18px;
    background: #F9FAFB;
    border: 1px solid #F0F0F0;
    border-radius: 14px;
}
.rm-pdp-steps-title {
    font-size: 15px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 14px;
}
.rm-pdp-steps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rm-pdp-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.rm-pdp-step-num {
    width: 28px;
    height: 28px;
    background: #0D9488;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.rm-pdp-step-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 1px;
}
.rm-pdp-step-info span {
    font-size: 12px;
    color: #737373;
    line-height: 1.4;
}
/* UK Manufactured Highlight */
.rm-pdp-highlight {
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%);
    border-radius: 14px;
    color: #fff;
}
.rm-pdp-highlight-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rm-pdp-highlight-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}
.rm-pdp-highlight strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.rm-pdp-highlight span {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
}

/* --- Homepage: Tighter spacing --- */
.cms-home .page-main {
    padding-top: 0;
}

/* --- Homepage: Product Slider Arrows - move into heading row --- */
.cms-home .rm-home .product-slider > .flex.justify-between {
    position: absolute;
    right: 0;
    top: -48px;
    z-index: 10;
}
.cms-home .rm-home .product-slider {
    position: relative;
}
.cms-home .rm-home .snap-slider:not(.product-slider) > .flex.justify-between {
    position: absolute;
    right: 0;
    top: -48px;
    z-index: 10;
}
.cms-home .rm-home .snap-slider:not(.product-slider) {
    position: relative;
}

/* --- Homepage: Product sliders - remove max-width constraints --- */
.cms-home .rm-home .product-slider {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0;
    padding-bottom: 8px;
}
.cms-home .rm-home .product-slider.my-8 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.cms-home .rm-home .snap-slider:not(.product-slider) {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}
.cms-home .snap-pager {
    margin-top: 8px;
    margin-bottom: 0;
}
.cms-home .rm-home .rm-c {
    padding-top: 32px;
    padding-bottom: 32px;
}
.cms-home .rm-home .rm-sh {
    margin-bottom: 24px;
}

/* --- Mobile fixes --- */
@media (max-width: 768px) {
    /* Reset slider arrow positioning */
    .cms-home .rm-home .product-slider > .flex.justify-between,
    .cms-home .rm-home .snap-slider:not(.product-slider) > .flex.justify-between {
        position: static;
        justify-content: flex-end;
        margin-bottom: 8px;
    }
    /* Reduce side padding on all sections for mobile */
    .cms-home .page-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .cms-home .page-main > .columns {
        padding-left: 0;
        padding-right: 0;
    }
    .cms-home .column.main {
        padding-left: 0;
        padding-right: 0;
    }
    .cms-home .rm-home {
        padding-left: 0;
        padding-right: 0;
        overflow-x: hidden;
    }
    .cms-home .rm-home .rm-c,
    .cms-home .rm-home .rm-trust,
    .cms-home .rm-home .rm-sh,
    .cms-home .rm-home .rm-spot-inner,
    .cms-home .rm-home .rm-hiw-inner,
    .cms-home .rm-home .rm-stats-grid,
    .cms-home .rm-home .rm-ind-inner {
        padding-left: 10px;
        padding-right: 10px;
    }
    /* Mobile: Show 2 category cards at a time */
    .cms-home .rm-home .rm-cat {
        min-width: 0;
        flex: 0 0 calc(50% - 8px);
    }
}
