/* Shared action buttons for Business and Personal storefronts. */
body :is(.landing-card h3, .iphone-catalog-copy h3, .personal-model h3, .personal-pick h3) {
    font-size: 17px !important;
}
body #latest .landing-card-color h3 {
    font-size: 28px !important;
}

:root {
    --store-button-background: linear-gradient(115deg, #2879ef, #4f5de5);
    --store-button-hover: linear-gradient(115deg, #206bdc, #414fd1);
    --store-button-radius: 12px;
}

body :is(.store-action-button, .btn-theme-style, .btn-purple-primary,
.btn-primary-custom, .btn-primary-custom2, .btn-card-action, .btn-primary,
.personal-primary, .personal-bulk-primary, .iphones-cart-checkout,
.b2b-place-order, .b2b-primary-action, .orders-primary-button,
.return-primary-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--store-button-radius) !important;
    background: var(--store-button-background) !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

body :is(.store-action-button, .btn-theme-style, .btn-purple-primary,
.btn-primary-custom, .btn-primary-custom2, .btn-card-action, .btn-primary,
.personal-primary, .personal-bulk-primary, .iphones-cart-checkout,
.b2b-place-order, .b2b-primary-action, .orders-primary-button,
.return-primary-button):not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--store-button-hover) !important;
    color: #fff !important;
}

body :is(.store-action-button, .btn-theme-style, .btn-purple-primary,
.btn-primary-custom, .btn-primary-custom2, .btn-card-action, .btn-primary,
.personal-primary, .personal-bulk-primary, .iphones-cart-checkout,
.b2b-place-order, .b2b-primary-action, .orders-primary-button,
.return-primary-button):focus-visible {
    outline: 2px solid #2879ef;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px #2879ef1a;
}

body :is(.store-action-button, .btn-theme-style, .btn-purple-primary,
.btn-primary-custom, .btn-primary-custom2, .btn-card-action, .btn-primary,
.personal-primary, .personal-bulk-primary, .iphones-cart-checkout,
.b2b-place-order, .b2b-primary-action, .orders-primary-button,
.return-primary-button):is(:disabled, [aria-disabled="true"], .disabled) {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
}

body :is(.b2b-secondary-action, .personal-bulk-secondary, .order-invoice-button,
.orders-clear-filter, .product-discovery-button) {
    border-radius: var(--store-button-radius) !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    body :is(.store-action-button, .btn-theme-style, .btn-purple-primary,
    .btn-primary-custom, .btn-primary-custom2, .btn-card-action, .btn-primary,
    .personal-primary, .personal-bulk-primary, .iphones-cart-checkout,
    .b2b-place-order, .b2b-primary-action, .orders-primary-button,
    .return-primary-button) { transition: none; }
}

/* One open-chevron treatment for product cards and carousel navigation. */
body :is(.landing-card-arrow, .landing-shelf-navigation button, .product-rail-controls button) {
    display: grid;
    place-items: center;
    padding: 0;
    line-height: 1;
}
body :is(.landing-card-arrow, .landing-shelf-navigation, .product-rail-controls) svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body .landing-shelf-navigation button { width: 48px; height: 48px; }

/* Shared link treatment across the personal and business storefronts. */
body a,
body a:is(:hover, :focus, :active),
body a * {
    text-decoration: none !important;
}

body :where(a:not(:has(img, svg)):not(.landing-card):not([class*="button"]):not([class*="btn"]):not(.storefront-tabs > a)) {
    display: inline-block;
    transform-origin: center;
    transition: scale 200ms ease;
}

body a :is(.site-chevron-link-arrow, span[aria-hidden="true"]:not(.landing-card-arrow):not(.landing-condition-plus)) {
    display: inline-block;
    transition: translate 200ms ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body :where(a:not(:has(img, svg)):not(.landing-card):not([class*="button"]):not([class*="btn"]):not(.storefront-tabs > a)):hover {
        scale: 1.035;
    }
    body a:hover :is(.site-chevron-link-arrow, span[aria-hidden="true"]:not(.landing-card-arrow):not(.landing-condition-plus)) {
        translate: 3px 0;
    }
    [dir="rtl"] body a:hover :is(.site-chevron-link-arrow, span[aria-hidden="true"]:not(.landing-card-arrow):not(.landing-condition-plus)) {
        translate: -3px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body a:not(:has(img, svg)),
    body a :is(.site-chevron-link-arrow, span[aria-hidden="true"]:not(.landing-card-arrow):not(.landing-condition-plus)) {
        transition: none;
    }
}

/* Card arrows stay fixed while the entire card scales. */
body .landing-card:is(:hover, :focus-visible) .landing-card-arrow {
    transform: none;
    translate: none;
}

body a .landing-card-arrow {
    display: grid;
    place-items: center;
}

body a .landing-card-arrow svg {
    margin: 0;
    align-self: center;
    justify-self: center;
}

body a .landing-condition-plus {
    display: grid;
    place-items: center;
    translate: none;
    line-height: 1;
}

body a .landing-condition-plus svg {
    display: block;
    margin: 0;
    align-self: center;
    justify-self: center;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
}

/* Text links in the shopping cards stay still; only their arrow moves. */
body .landing-shopping a:is(:hover, :focus-visible) { scale: 1; }
@media (prefers-reduced-motion: no-preference) {
    body .landing-shopping a:is(:hover, :focus-visible) > span[aria-hidden="true"],
    [dir="rtl"] body .landing-shopping a:is(:hover, :focus-visible) > span[aria-hidden="true"] {
        translate: 3px -3px;
    }
}

body .landing-card-arrow svg { width: 16px; height: 16px; }

/* Every package tile scales as one unit, including its image. */
body .landing-package .landing-showcase a {
    transform-origin: center;
    transition: scale 200ms ease;
}
body .landing-package .landing-showcase a:hover img { transform: none; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body .landing-package .landing-showcase a:is(:hover, :focus-visible) {
        scale: 1.035;
        z-index: 2;
    }
}
@media (prefers-reduced-motion: reduce) {
    body .landing-package .landing-showcase a { transition: none; }
}

body .landing-hero .landing-button {
    transition: transform 240ms cubic-bezier(0, 0, .5, 1),
        background-color 240ms ease, box-shadow 240ms ease, filter 240ms ease;
}
body .landing-categories a {
    transition: color 240ms ease;
}
body .landing-categories a img {
    transition: transform 300ms cubic-bezier(0, 0, .5, 1);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body .landing-hero .landing-button:is(:hover, :focus-visible) {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgb(0 113 227 / 28%);
    }
    body .landing-hero .landing-button-dark:is(:hover, :focus-visible) {
        background-color: #292929;
        box-shadow: 0 6px 18px rgb(255 255 255 / 12%);
    }
    body .landing-categories a:is(:hover, :focus-visible) img {
        transform: translateY(-4px) scale(1.05);
    }
}
body .landing-hero .landing-button:active { transform: translateY(0); box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
    body .landing-hero .landing-button,
    body .landing-categories a,
    body .landing-categories a img { transition: none; }
}

/* Keep footer text crisp during hover; use color and shadows instead of scaling. */
body .landing-footer a,
body .landing-footer a:is(:hover, :focus-visible),
body .landing-footer .landing-footer-benefits li:is(:hover, :focus-visible) {
    scale: 1;
}

/* Center service icons; shared arrow styling must not change their layout. */
body .product-about-benefits a .product-benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    translate: none;
}
body .product-about-benefits a .product-benefit-icon svg {
    display: block;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin: 0;
}

body .product-about-benefits a .product-benefit-icon {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
}
body .product-about-benefits a .product-benefit-icon > svg {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 24px;
    height: 24px;
    transform: none;
    translate: none;
}

body .landing-footer-columns a {
    transition: translate 220ms cubic-bezier(0, 0, .5, 1), color 220ms ease;
    transform: none;
    scale: 1;
    filter: none;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body .landing-footer-columns a:is(:hover, :focus-visible) {
        translate: 0 -2px;
        color: #0071e3;
        scale: 1;
        filter: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    body .landing-footer-columns a { transition: none; }
}

body .landing-footer-benefits li {
    transition: translate 220ms cubic-bezier(0, 0, .5, 1), color 220ms ease;
    scale: 1;
    filter: none;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body .landing-footer .landing-footer-benefits li:hover {
        translate: 0 -2px;
        color: inherit;
        scale: 1;
        filter: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    body .landing-footer-benefits li { transition: none; }
}
